00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #ifndef LASS_GUARDIAN_OF_INCLUSION_STDE_EXTENDED_STRING_H
00056 #define LASS_GUARDIAN_OF_INCLUSION_STDE_EXTENDED_STRING_H
00057
00058 #include "stde_common.h"
00059
00060 #if LASS_PLATFORM_TYPE == LASS_PLATFORM_TYPE_BSD
00061 # ifdef toupper
00062 # undef toupper
00063 # endif
00064 # ifdef tolower
00065 # undef tolower
00066 # endif
00067 #endif
00068
00069 namespace lass
00070 {
00071 namespace stde
00072 {
00073
00074 template <typename Char, typename Traits, typename Alloc>
00075 std::basic_string<Char, Traits, Alloc>
00076 tolower(const std::basic_string<Char, Traits, Alloc>& input,
00077 const std::locale& locale = std::locale());
00078
00079 template <typename Char, typename Traits, typename Alloc>
00080 std::basic_string<Char, Traits, Alloc>
00081 toupper(const std::basic_string<Char, Traits, Alloc>& input,
00082 const std::locale& locale = std::locale());
00083
00084 template <typename Char, typename Traits, typename Alloc>
00085 std::basic_string<Char, Traits, Alloc>
00086 replace_all(const std::basic_string<Char, Traits, Alloc>& input,
00087 const std::basic_string<Char, Traits, Alloc>& to_be_replaced,
00088 const std::basic_string<Char, Traits, Alloc>& replacement);
00089 template <typename Char, typename Traits, typename Alloc>
00090 std::basic_string<Char, Traits, Alloc>
00091 replace_all(const std::basic_string<Char, Traits, Alloc>& input,
00092 const Char* to_be_replaced,
00093 const Char* replacement);
00094
00095 template <typename Char, typename Traits, typename Alloc>
00096 bool begins_with(const std::basic_string<Char, Traits, Alloc>& input,
00097 const std::basic_string<Char, Traits, Alloc>& prefix);
00098 template <typename Char, typename Traits, typename Alloc>
00099 bool begins_with(const std::basic_string<Char, Traits, Alloc>& input,
00100 const Char* prefix);
00101
00102 template <typename Char, typename Traits, typename Alloc>
00103 bool ends_with(const std::basic_string<Char, Traits, Alloc>& input,
00104 const std::basic_string<Char, Traits, Alloc>& suffix);
00105 template <typename Char, typename Traits, typename Alloc>
00106 bool ends_with(const std::basic_string<Char, Traits, Alloc>& input,
00107 const Char* suffix);
00108
00109 template <typename Char, typename Traits, typename Alloc>
00110 std::vector< std::basic_string<Char, Traits, Alloc> >
00111 split(const std::basic_string<Char, Traits, Alloc>& to_be_split);
00112
00113 template <typename Char, typename Traits, typename Alloc>
00114 std::vector< std::basic_string<Char, Traits, Alloc> >
00115 split(const std::basic_string<Char, Traits, Alloc>& to_be_split,
00116 const std::basic_string<Char, Traits, Alloc>& seperator,
00117 size_t max_split = 0);
00118 template <typename Char, typename Traits, typename Alloc>
00119 std::vector< std::basic_string<Char, Traits, Alloc> >
00120 split(const std::basic_string<Char, Traits, Alloc>& to_be_split,
00121 const Char* seperator,
00122 size_t max_split = 0);
00123
00124 template <typename Char, typename Traits, typename Alloc, typename InputIterator>
00125 std::basic_string<Char, Traits, Alloc>
00126 join(const std::basic_string<Char, Traits, Alloc>& joiner, InputIterator first, InputIterator last);
00127
00128 template <typename Char, typename Traits, typename Alloc, typename InputRange>
00129 std::basic_string<Char, Traits, Alloc>
00130 join_r(const std::basic_string<Char, Traits, Alloc>& joiner, const InputRange& range);
00131
00132 template <typename Char, typename Traits, typename Alloc>
00133 std::basic_string<Char, Traits, Alloc>
00134 lstrip(const std::basic_string<Char, Traits, Alloc>& to_be_stripped,
00135 const std::basic_string<Char, Traits, Alloc>& to_be_removed);
00136
00137 template <typename Char, typename Traits, typename Alloc>
00138 std::basic_string<Char, Traits, Alloc>
00139 lstrip(const std::basic_string<Char, Traits, Alloc>& to_be_stripped);
00140
00141 template <typename Char, typename Traits, typename Alloc>
00142 std::basic_string<Char, Traits, Alloc>
00143 rstrip(const std::basic_string<Char, Traits, Alloc>& to_be_stripped,
00144 const std::basic_string<Char, Traits, Alloc>& to_be_removed);
00145
00146 template <typename Char, typename Traits, typename Alloc>
00147 std::basic_string<Char, Traits, Alloc>
00148 rstrip(const std::basic_string<Char, Traits, Alloc>& to_be_stripped);
00149
00150 template <typename Char, typename Traits, typename Alloc>
00151 std::basic_string<Char, Traits, Alloc>
00152 strip(const std::basic_string<Char, Traits, Alloc>& to_be_stripped,
00153 const std::basic_string<Char, Traits, Alloc>& to_be_removed);
00154
00155 template <typename Char, typename Traits, typename Alloc>
00156 std::basic_string<Char, Traits, Alloc>
00157 strip(const std::basic_string<Char, Traits, Alloc>& to_be_stripped);
00158
00159 }
00160
00161 }
00162
00163 #include "extended_string.inl"
00164
00165 #endif
00166
00167