- Timestamp:
- Apr 11, 2025, 8:52:08 AM (5 months ago)
- Branches:
- master
- Children:
- c4f8c4bf
- Parents:
- d03a386
- Location:
- libcfa/src/collections
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string.cfa
rd03a386 rdab6e39 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 9 22:27:40202513 // Update Count : 36 812 // Last Modified On : Fri Apr 11 08:31:21 2025 13 // Update Count : 369 14 14 // 15 15 … … 207 207 208 208 forall( ostype & | basic_ostream( ostype ) ) { 209 210 209 ostype & ?|?( ostype & out, string s ) { 211 210 return out | (*s.inner); // print internal string_res … … 231 230 232 231 forall( istype & | basic_istream( istype ) ) { 233 234 232 istype & ?|?( istype & in, string & s ) { 235 233 return in | (*s.inner); // read to internal string_res … … 540 538 if ( pos < len( s ) ) { 541 539 r = s( 0, pos ) + to + replace( s( pos + (ssize_t)len( from ) ), from, to ); 542 string front = s( 0, pos );543 string back = s( pos + (ssize_t)len( from ) );544 r = front + to + replace( back, from, to );545 540 } else { 546 541 r = s; -
libcfa/src/collections/string.hfa
rd03a386 rdab6e39 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 9 22:27:41202513 // Update Count : 2 5912 // Last Modified On : Fri Apr 11 08:28:27 2025 13 // Update Count : 260 14 14 // 15 15 … … 100 100 _Ostream_Manip(string) & nobase( _Ostream_Manip(string) & fmt ) { fmt.flags.nobsdp = true; return fmt; } 101 101 } // distribution 102 102 103 forall( ostype & | basic_ostream( ostype ) ) { 103 104 ostype & ?|?( ostype & os, _Ostream_Manip(string) f ); … … 150 151 _Istream_Sstr & ignore( _Istream_Sstr & f ) { f.flags.ignore = true; return (_Istream_Sstr &)f; } 151 152 } // distribution 153 152 154 forall( istype & | basic_istream( istype ) ) { 153 155 istype & ?|?( istype & is, _Istream_Squoted f ); … … 238 240 size_t find( const string & s, size_t start, const char * key ); 239 241 size_t find( const string & s, size_t start, const char * key, size_t keysize ); 240 static inline ?^?( const string & key, const string & s ) { return find( s, key ); }241 static inline ?^?( const char * key, const string & s ) { return find( s, key ); }242 242 243 243 bool includes( const string & s, const string & mask );
Note:
See TracChangeset
for help on using the changeset viewer.