Changeset 38951c31 for libcfa/src/collections
- Timestamp:
- Jan 16, 2024, 5:30:58 PM (11 months ago)
- Branches:
- master
- Children:
- 06280ad
- Parents:
- 739495a
- Location:
- libcfa/src/collections
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string.cfa
r739495a r38951c31 236 236 // Repetition 237 237 238 void ?*=?(string & s, size_t factor) { 239 (*s.inner) *= factor; 240 } 241 238 242 string ?*?(const string & s, size_t factor) { 239 string ret = ""; 240 for (factor) ret += s; 241 return ret; 242 } 243 244 void ?*=?(string & s, size_t factor) { 245 s = s * factor; 243 string ret = s; 244 ret *= factor; 245 return ret; 246 246 } 247 247 248 248 string ?*?(char c, size_t factor) { 249 249 string ret = c; 250 return ret * factor; 250 ret *= factor; 251 return ret; 251 252 } 252 253 253 254 string ?*?(const char * s, size_t factor) { 254 255 string ret = s; 255 return ret * factor; 256 ret *= factor; 257 return ret; 256 258 } 257 259 -
libcfa/src/collections/string_res.cfa
r739495a r38951c31 642 642 643 643 644 /////////////////////////////////////////////////////////////////// 645 // Repetition 646 647 void ?*=?(string_res & s, size_t factor) { 648 string_res s2 = { s, COPY_VALUE, 0, size(s) }; 649 s = ""; 650 for (factor) s += s2; 651 } 652 644 653 ////////////////////////////////////////////////////////// 645 654 // Comparisons -
libcfa/src/collections/string_res.hfa
r739495a r38951c31 136 136 } 137 137 138 // Repetition 139 void ?*=?(string_res & s, size_t factor); 140 138 141 // Character access 139 142 void assignAt(const string_res & s, size_t index, char val);
Note: See TracChangeset
for help on using the changeset viewer.