Changeset bb1eabc for libcfa/src/collections
- Timestamp:
- May 4, 2026, 7:26:38 AM (10 days ago)
- Branches:
- master
- Children:
- 244335b
- Parents:
- 8403b32
- Location:
- libcfa/src/collections
- Files:
-
- 2 edited
-
string.cfa (modified) (2 diffs)
-
string.hfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string.cfa
r8403b32 rbb1eabc 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 15 10:26:35 202513 // Update Count : 39 412 // Last Modified On : Sun May 3 23:21:25 2026 13 // Update Count : 395 14 14 // 15 15 … … 214 214 for ( i; l ) cstr[i] = f.val[i]; // copy string 215 215 cstr[l] = '\0'; // terminate 216 _Ostream_Manip(const char *) cf @= { cstr, f.wd, f.pc, f.base, {f.all} };216 _Ostream_Manip(const char *) cf @= { cstr, f.wd, f.pc, f.base, {f.all}, f.qleft, f.qright }; 217 217 return os | cf | nonl; 218 218 } // ?|? -
libcfa/src/collections/string.hfa
r8403b32 rbb1eabc 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S at May 2 19:09:55202613 // Update Count : 32 212 // Last Modified On : Sun May 3 23:24:08 2026 13 // Update Count : 324 14 14 // 15 15 … … 90 90 _Ostream_Manip(string) oct( string s ) { return (_Ostream_Manip(string))@{ .val = s, .wd = 1, .pc = 0, .base = 'o', { .all = 0 } }; } 91 91 _Ostream_Manip(string) hex( string s ) { return (_Ostream_Manip(string))@{ .val = s, .wd = 1, .pc = 0, .base = 'x', { .all = 0 } }; } 92 _Ostream_Manip(string) quote( string s ) { return (_Ostream_Manip(string))@{ .val = s, .wd = 1, .pc = 0, .base = 's', { .flags.quote = true } }; } 92 _Ostream_Manip(string) quote( string s, const char qleft = '"', const char qright = '\0' ) { 93 return (_Ostream_Manip(string))@{ .val = s, .wd = 1, .pc = 0, .base = 's', { .flags.quote = true }, .qleft = qleft, .qright = qright }; } 93 94 _Ostream_Manip(string) wd( unsigned int wd, string s ) { return (_Ostream_Manip(string))@{ .val = s, .wd = wd, .pc = 0, .base = 's', { .all = 0 } }; } 94 95 _Ostream_Manip(string) wd( unsigned int wd, unsigned int pc, string s ) { return (_Ostream_Manip(string))@{ .val = s, .wd = wd, .pc = pc, .base = 's', { .flags.pc = true } }; } … … 98 99 _Ostream_Manip(string) & nobase( _Ostream_Manip(string) & fmt ) { fmt.flags.nobsdp = true; return fmt; } 99 100 _Ostream_Manip(string) & upcase( _Ostream_Manip(string) & fmt ) { if ( fmt.base == 'x' || fmt.base == 'b' ) fmt.base -= 32; /* upper case */ return fmt; } 100 _Ostream_Manip(string) & quote( _Ostream_Manip(string) & fmt ) { fmt.flags.quote = true; return fmt; } \ 101 _Ostream_Manip(string) & quote( _Ostream_Manip(string) & fmt, const char qleft = '"', const char qright = '\0' ) { 102 fmt.flags.quote = true; fmt.qleft = qleft, fmt.qright = qright; return fmt; } 101 103 } // distribution 102 104
Note:
See TracChangeset
for help on using the changeset viewer.