/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/utility/string.cpp

  • Committer: edam
  • Date: 2012-02-28 16:50:26 UTC
  • Revision ID: edam@waxworlds.org-20120228165026-pwnwo300xx2e2kg6
removed ulibc, fixed button, added text rendering

Show diffs side-by-side

added added

removed removed

1
 
/*      Copyright (C) 2004 Garrett A. Kajmowicz
2
 
 
3
 
        This file is part of the uClibc++ Library.
4
 
 
5
 
        This library is free software; you can redistribute it and/or
6
 
        modify it under the terms of the GNU Lesser General Public
7
 
        License as published by the Free Software Foundation; either
8
 
        version 2.1 of the License, or (at your option) any later version.
9
 
 
10
 
        This library is distributed in the hope that it will be useful,
11
 
        but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
        Lesser General Public License for more details.
14
 
 
15
 
        You should have received a copy of the GNU Lesser General Public
16
 
        License along with this library; if not, write to the Free Software
17
 
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
*/
19
 
 
20
 
#define __UCLIBCXX_COMPILE_STRING__ 1
21
 
 
22
 
#include <basic_definitions>
23
 
#include <char_traits>
24
 
#include <string>
25
 
#include <string_iostream>
26
 
#include <string.h>
27
 
#include <ostream>
28
 
 
29
 
namespace std{
30
 
 
31
 
#ifdef __UCLIBCXX_EXPAND_STRING_CHAR__
32
 
 
33
 
#ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__
34
 
 
35
 
        template _UCXXEXPORT string::basic_string(const allocator<char> &);
36
 
        template _UCXXEXPORT string::basic_string(size_type n, char c, const allocator<char> & );
37
 
        template _UCXXEXPORT string::basic_string(const char* s, const allocator<char>& al);
38
 
        template _UCXXEXPORT string::basic_string(const basic_string& str, size_type pos, size_type n, const allocator<char>& al);
39
 
        template _UCXXEXPORT string::~basic_string();
40
 
 
41
 
#endif // __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__
42
 
 
43
 
        template _UCXXEXPORT string & string::append(const char * s, size_type n);
44
 
 
45
 
        template _UCXXEXPORT string::size_type string::find(const string & str, size_type pos) const;
46
 
        template _UCXXEXPORT string::size_type string::find(const char* s, size_type pos) const;
47
 
        template _UCXXEXPORT string::size_type string::find (char c, size_type pos) const;
48
 
        template _UCXXEXPORT string::size_type string::rfind(const string & str, size_type pos) const;
49
 
        template _UCXXEXPORT string::size_type string::rfind(char c, size_type pos) const;
50
 
        template _UCXXEXPORT string::size_type string::rfind(const char* s, size_type pos) const;
51
 
 
52
 
        template _UCXXEXPORT string::size_type string::find_first_of(const string &, size_type) const;
53
 
        template _UCXXEXPORT string::size_type string::find_first_of(const char *, size_type pos, size_type n) const;
54
 
        template _UCXXEXPORT string::size_type string::find_first_of(const char*, size_type pos) const;
55
 
        template _UCXXEXPORT string::size_type string::find_first_of(char c, size_type pos) const;
56
 
 
57
 
        template _UCXXEXPORT string::size_type string::find_last_of (const string & , size_type pos) const;
58
 
        template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos, size_type n) const;
59
 
        template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos) const;
60
 
        template _UCXXEXPORT string::size_type string::find_last_of (char c, size_type pos) const;
61
 
 
62
 
        template _UCXXEXPORT string::size_type string::find_first_not_of(const string &, size_type) const;
63
 
        template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type, size_type) const;
64
 
        template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type) const;
65
 
        template _UCXXEXPORT string::size_type string::find_first_not_of(char c, size_type) const;
66
 
 
67
 
        template _UCXXEXPORT int string::compare(const string & str) const;
68
 
//      template _UCXXEXPORT int string::compare(size_type pos1, size_type n1, const string & str) const;
69
 
        template _UCXXEXPORT int string::compare(
70
 
                size_type pos1, size_type n1, const string & str, size_type pos2, size_type n2) const;
71
 
 
72
 
        template _UCXXEXPORT string string::substr(size_type pos, size_type n) const;
73
 
 
74
 
        template _UCXXEXPORT string & string::operator=(const string & str);
75
 
        template _UCXXEXPORT string & string::operator=(const char * s);
76
 
 
77
 
        template _UCXXEXPORT bool operator==(const string & lhs, const string & rhs);
78
 
        template _UCXXEXPORT bool operator==(const char * lhs, const string & rhs);
79
 
        template _UCXXEXPORT bool operator==(const string & lhs, const char * rhs);
80
 
 
81
 
        template _UCXXEXPORT bool operator!=(const string & lhs, const string & rhs);
82
 
        template _UCXXEXPORT bool operator!=(const char * lhs, const string & rhs);
83
 
        template _UCXXEXPORT bool operator!=(const string & lhs, const char * rhs);
84
 
 
85
 
        template _UCXXEXPORT string operator+(const string & lhs, const char* rhs);
86
 
        template _UCXXEXPORT string operator+(const char* lhs, const string & rhs);
87
 
        template _UCXXEXPORT string operator+(const string & lhs,       const string & rhs);
88
 
 
89
 
        template _UCXXEXPORT bool operator> (const string & lhs, const string & rhs);
90
 
        template _UCXXEXPORT bool operator< (const string & lhs, const string & rhs);
91
 
 
92
 
 
93
 
//Functions dependent upon OSTREAM
94
 
#ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__
95
 
 
96
 
template _UCXXEXPORT ostream & operator<<(ostream & os, const string & str);
97
 
 
98
 
#endif
99
 
 
100
 
 
101
 
//Functions dependent upon ISTREAM
102
 
#ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__
103
 
 
104
 
template _UCXXEXPORT istream & operator>>(istream & is, string & str);
105
 
 
106
 
 
107
 
#endif
108
 
 
109
 
 
110
 
#endif
111
 
 
112
 
}