Changeset e8b3717 for libcfa/src/collections/string_res.cfa
- Timestamp:
- Jan 18, 2024, 10:17:21 PM (8 months ago)
- Branches:
- master
- Children:
- f988834
- Parents:
- 906d8fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string_res.cfa
r906d8fa re8b3717 346 346 } 347 347 348 348 349 // General copy constructor 349 void ?{}(string_res & s, const string_res & s2, StrResInitMode mode, size_t start, size_t end ) { 350 350 void ?{}(string_res & s, const string_res & s2, StrResInitMode mode, size_t start, size_t len ) { 351 352 size_t end = start + len; 351 353 verify( start <= end && end <= s2.Handle.lnth ); 352 354 … … 611 613 612 614 void assignAt(const string_res & s, size_t index, char val) { 613 string_res editZone = { s, SHARE_EDITS, index, index+1 }; 615 // caution: not tested (not reachable by string-api-coverage interface) 616 // equivalent form at string level is `s[index] = val`, 617 // which uses the overload that returns a length-1 string 618 string_res editZone = { s, SHARE_EDITS, index, 1 }; 614 619 assign(editZone, &val, 1); 615 620 } … … 656 661 657 662 void ?*=?(string_res & s, size_t factor) { 658 string_res s2 = { s, COPY_VALUE , 0, size(s)};663 string_res s2 = { s, COPY_VALUE }; 659 664 s = ""; 660 665 for (factor) s += s2;
Note: See TracChangeset
for help on using the changeset viewer.