Changeset 92d8cda for libcfa/src/collections/string_res.hfa
- Timestamp:
- Sep 6, 2023, 11:49:02 AM (14 months ago)
- Branches:
- master
- Children:
- 4a40fca7, 79b05224, 9d47c1f
- Parents:
- 1f10959 (diff), 1fc111c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string_res.hfa
r1f10959 r92d8cda 102 102 void ?|?(ofstream &out, const string_res &s); 103 103 ifstream & ?|?(ifstream &in, string_res &s); 104 void ?|?( ifstream & in, string_res & this ); 105 106 struct _Istream_Rstr { 107 string_res * s; 108 inline _Istream_str_base; 109 }; // _Istream_Rstr 110 111 static inline { 112 // read width does not include null terminator 113 _Istream_Rstr wdi( unsigned int rwd, string_res & s ) { return (_Istream_Rstr)@{ &s, {{0p}, rwd, {.flags.rwd : true}} }; } 114 _Istream_Rstr getline( string_res & s, const char delimiter = '\n' ) { 115 return (_Istream_Rstr)@{ &s, {{.delimiter : { delimiter, '\0' } }, -1, {.flags.delimiter : true, .flags.inex : true}} }; 116 } 117 _Istream_Rstr & getline( _Istream_Rstr & fmt, const char delimiter = '\n' ) { 118 fmt.delimiter[0] = delimiter; fmt.delimiter[1] = '\0'; fmt.flags.delimiter = true; fmt.flags.inex = true; return fmt; 119 } 120 _Istream_Rstr incl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ &s, {{scanset}, -1, {.flags.inex : false}} }; } 121 _Istream_Rstr & incl( const char scanset[], _Istream_Rstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = false; return fmt; } 122 _Istream_Rstr excl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ &s, {{scanset}, -1, {.flags.inex : true}} }; } 123 _Istream_Rstr & excl( const char scanset[], _Istream_Rstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; } 124 _Istream_Rstr ignore( string_res & s ) { return (_Istream_Rstr)@{ &s, {{0p}, -1, {.flags.ignore : true}} }; } 125 _Istream_Rstr & ignore( _Istream_Rstr & fmt ) { fmt.flags.ignore = true; return fmt; } 126 } // distribution 127 ifstream & ?|?( ifstream & is, _Istream_Rstr f ); 128 void ?|?( ifstream & is, _Istream_Rstr t ); 104 129 105 130 // Concatenation
Note: See TracChangeset
for help on using the changeset viewer.