Changeset 30548de for libcfa/src/collections/string_res.hfa
- Timestamp:
- Apr 11, 2025, 6:39:45 PM (9 months ago)
- Branches:
- master
- Children:
- a514fed
- Parents:
- a800a19
- File:
-
- 1 edited
-
libcfa/src/collections/string_res.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string_res.hfa
ra800a19 r30548de 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 15:16:29202513 // Update Count : 7 612 // Last Modified On : Fri Apr 11 18:11:05 2025 13 // Update Count : 77 14 14 // 15 15 … … 132 132 }; // _Istream_Rwidth 133 133 134 struct _Istream_Rquote d{134 struct _Istream_Rquote { 135 135 // string_res * s; 136 136 // inline _Istream_str_base; 137 137 _Istream_Rwidth rstr; 138 }; // _Istream_Rquote d138 }; // _Istream_Rquote 139 139 140 140 struct _Istream_Rstr { … … 154 154 f.delimiters[0] = delimiter; f.delimiters[1] = '\0'; f.flags.delimiter = true; return (_Istream_Rstr &)f; 155 155 } 156 _Istream_Rquote d quoted( string_res & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {157 return (_Istream_Rquote d)@{ { .s = &s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };158 } 159 _Istream_Rquote d & quoted( _Istream_Rwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {156 _Istream_Rquote quote( string_res & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) { 157 return (_Istream_Rquote)@{ { .s = &s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } }; 158 } 159 _Istream_Rquote & quote( _Istream_Rwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) { 160 160 f.delimiters[0] = Ldelimiter; f.delimiters[1] = Rdelimiter; f.delimiters[2] = '\0'; 161 return (_Istream_Rquote d&)f;161 return (_Istream_Rquote &)f; 162 162 } 163 163 _Istream_Rstr incl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } }; } … … 167 167 _Istream_Rstr ignore( string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } }; } 168 168 _Istream_Rstr & ignore( _Istream_Rwidth & f ) { f.flags.ignore = true; return (_Istream_Rstr &)f; } 169 _Istream_Rquote d & ignore( _Istream_Rquoted & f ) { f.rstr.flags.ignore = true; return (_Istream_Rquoted&)f; }169 _Istream_Rquote & ignore( _Istream_Rquote & f ) { f.rstr.flags.ignore = true; return (_Istream_Rquote &)f; } 170 170 _Istream_Rstr & ignore( _Istream_Rstr & f ) { f.flags.ignore = true; return (_Istream_Rstr &)f; } 171 171 } // distribution 172 172 forall( istype & | basic_istream( istype ) ) { 173 istype & ?|?( istype & is, _Istream_Rquote df );173 istype & ?|?( istype & is, _Istream_Rquote f ); 174 174 istype & ?|?( istype & is, _Istream_Rstr f ); 175 175 static inline istype & ?|?( istype & is, _Istream_Rwidth f ) { return is | *(_Istream_Rstr *)&f; }
Note:
See TracChangeset
for help on using the changeset viewer.