Chameleon

Chameleon Svn Source Tree

Root/tags/2.0/i386/modules/uClibcxx/string.cpp

Source at commit 1808 created 12 years 4 months ago.
By blackosx, Revise layout of package installer 'Welcome' file so it looks cleaner. Change the copyright notice to begin from 2009 as seen in the Chameleon 2.0 r431 installer. Should this date be set earlier?
1/*Copyright (C) 2004 Garrett A. Kajmowicz
2
3This file is part of the uClibc++ Library.
4
5This library is free software; you can redistribute it and/or
6modify it under the terms of the GNU Lesser General Public
7License as published by the Free Software Foundation; either
8version 2.1 of the License, or (at your option) any later version.
9
10This library is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public
16License along with this library; if not, write to the Free Software
17Foundation, 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
29namespace std{
30
31#ifdef __UCLIBCXX_EXPAND_STRING_CHAR__
32
33#ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__
34
35template _UCXXEXPORT string::basic_string(const allocator<char> &);
36template _UCXXEXPORT string::basic_string(size_type n, char c, const allocator<char> & );
37template _UCXXEXPORT string::basic_string(const char* s, const allocator<char>& al);
38template _UCXXEXPORT string::basic_string(const basic_string& str, size_type pos, size_type n, const allocator<char>& al);
39template _UCXXEXPORT string::~basic_string();
40
41#endif // __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__
42
43template _UCXXEXPORT string & string::append(const char * s, size_type n);
44
45template _UCXXEXPORT string::size_type string::find(const string & str, size_type pos) const;
46template _UCXXEXPORT string::size_type string::find(const char* s, size_type pos) const;
47template _UCXXEXPORT string::size_type string::find (char c, size_type pos) const;
48template _UCXXEXPORT string::size_type string::rfind(const string & str, size_type pos) const;
49template _UCXXEXPORT string::size_type string::rfind(char c, size_type pos) const;
50template _UCXXEXPORT string::size_type string::rfind(const char* s, size_type pos) const;
51
52template _UCXXEXPORT string::size_type string::find_first_of(const string &, size_type) const;
53template _UCXXEXPORT string::size_type string::find_first_of(const char *, size_type pos, size_type n) const;
54template _UCXXEXPORT string::size_type string::find_first_of(const char*, size_type pos) const;
55template _UCXXEXPORT string::size_type string::find_first_of(char c, size_type pos) const;
56
57template _UCXXEXPORT string::size_type string::find_last_of (const string & , size_type pos) const;
58template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos, size_type n) const;
59template _UCXXEXPORT string::size_type string::find_last_of (const char* s, size_type pos) const;
60template _UCXXEXPORT string::size_type string::find_last_of (char c, size_type pos) const;
61
62template _UCXXEXPORT string::size_type string::find_first_not_of(const string &, size_type) const;
63template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type, size_type) const;
64template _UCXXEXPORT string::size_type string::find_first_not_of(const char*, size_type) const;
65template _UCXXEXPORT string::size_type string::find_first_not_of(char c, size_type) const;
66
67template _UCXXEXPORT int string::compare(const string & str) const;
68//template _UCXXEXPORT int string::compare(size_type pos1, size_type n1, const string & str) const;
69template _UCXXEXPORT int string::compare(
70size_type pos1, size_type n1, const string & str, size_type pos2, size_type n2) const;
71
72template _UCXXEXPORT string string::substr(size_type pos, size_type n) const;
73
74template _UCXXEXPORT string & string::operator=(const string & str);
75template _UCXXEXPORT string & string::operator=(const char * s);
76
77template _UCXXEXPORT bool operator==(const string & lhs, const string & rhs);
78template _UCXXEXPORT bool operator==(const char * lhs, const string & rhs);
79template _UCXXEXPORT bool operator==(const string & rhs, const char * rhs);
80
81template _UCXXEXPORT bool operator!=(const string & lhs, const string & rhs);
82template _UCXXEXPORT bool operator!=(const char * lhs, const string & rhs);
83template _UCXXEXPORT bool operator!=(const string & rhs, const char * rhs);
84
85template _UCXXEXPORT string operator+(const string & lhs, const char* rhs);
86template _UCXXEXPORT string operator+(const char* lhs, const string & rhs);
87template _UCXXEXPORT string operator+(const string & lhs,const string & rhs);
88
89template _UCXXEXPORT bool operator> (const string & lhs, const string & rhs);
90template _UCXXEXPORT bool operator< (const string & lhs, const string & rhs);
91
92
93//Functions dependent upon OSTREAM
94#ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__
95
96template _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
104template _UCXXEXPORT istream & operator>>(istream & is, string & str);
105
106
107#endif
108
109
110#endif
111
112}
113

Archive Download this file

Revision: 1808