@@ -222,8 +222,8 @@ Methods to Change Case
222222 u('foo BAR bάz')->localeUpper('el'); // 'FOO BAR BAZ'
223223
224224 // changes all graphemes/code points to "title case"
225- u('foo ijssel')->title(); // 'Foo ijssel'
226- u('foo ijssel')->title(true); // 'Foo Ijssel'
225+ u('foo ijssel')->title(); // 'Foo ijssel'
226+ u('foo ijssel')->title(allWords: true); // 'Foo Ijssel'
227227 // changes all graphemes/code points to "title case" according to locale-specific case mappings
228228 u('foo ijssel')->localeTitle('en'); // 'Foo ijssel'
229229 u('foo ijssel')->localeTitle('nl'); // 'Foo IJssel'
@@ -269,20 +269,20 @@ Methods to Append and Prepend
269269 u('UserControllerController')->ensureEnd('Controller'); // 'UserController'
270270
271271 // returns the contents found before/after the first occurrence of the given string
272- u('hello world')->before('world'); // 'hello '
273- u('hello world')->before('o'); // 'hell'
274- u('hello world')->before('o', true); // 'hello'
272+ u('hello world')->before('world'); // 'hello '
273+ u('hello world')->before('o'); // 'hell'
274+ u('hello world')->before('o', includeNeedle: true); // 'hello'
275275
276- u('hello world')->after('hello'); // ' world'
277- u('hello world')->after('o'); // ' world'
278- u('hello world')->after('o', true); // 'o world'
276+ u('hello world')->after('hello'); // ' world'
277+ u('hello world')->after('o'); // ' world'
278+ u('hello world')->after('o', includeNeedle: true); // 'o world'
279279
280280 // returns the contents found before/after the last occurrence of the given string
281- u('hello world')->beforeLast('o'); // 'hello w'
282- u('hello world')->beforeLast('o', true); // 'hello wo'
281+ u('hello world')->beforeLast('o'); // 'hello w'
282+ u('hello world')->beforeLast('o', includeNeedle: true); // 'hello wo'
283283
284- u('hello world')->afterLast('o'); // 'rld'
285- u('hello world')->afterLast('o', true); // 'orld'
284+ u('hello world')->afterLast('o'); // 'rld'
285+ u('hello world')->afterLast('o', includeNeedle: true); // 'orld'
286286
287287Methods to Pad and Trim
288288~~~~~~~~~~~~~~~~~~~~~~~
@@ -395,17 +395,17 @@ Methods to Join, Split, Truncate and Reverse
395395 u('Lorem Ipsum')->truncate(80); // 'Lorem Ipsum'
396396 // the second argument is the character(s) added when a string is cut
397397 // (the total length includes the length of this character(s))
398- u('Lorem Ipsum')->truncate(8, '…'); // 'Lorem I…'
398+ u('Lorem Ipsum')->truncate(8, '…'); // 'Lorem I…'
399399 // if the third argument is false, the last word before the cut is kept
400400 // even if that generates a string longer than the desired length
401- u('Lorem Ipsum')->truncate(8, '…', false); // 'Lorem Ipsum'
401+ u('Lorem Ipsum')->truncate(8, '…', cut: false); // 'Lorem Ipsum'
402402
403403::
404404
405405 // breaks the string into lines of the given length
406- u('Lorem Ipsum')->wordwrap(4); // 'Lorem\nIpsum'
406+ u('Lorem Ipsum')->wordwrap(4); // 'Lorem\nIpsum'
407407 // by default it breaks by white space; pass TRUE to break unconditionally
408- u('Lorem Ipsum')->wordwrap(4, "\n", true); // 'Lore\nm\nIpsu\nm'
408+ u('Lorem Ipsum')->wordwrap(4, "\n", cut: true); // 'Lore\nm\nIpsu\nm'
409409
410410 // replaces a portion of the string with the given contents:
411411 // the second argument is the position where the replacement starts;
@@ -419,7 +419,7 @@ Methods to Join, Split, Truncate and Reverse
419419 u('0123456789')->chunk(3); // ['012', '345', '678', '9']
420420
421421 // reverses the order of the string contents
422- u('foo bar')->reverse(); // 'rab oof'
422+ u('foo bar')->reverse(); // 'rab oof'
423423 u('さよなら')->reverse(); // 'らなよさ'
424424
425425Methods Added by ByteString
0 commit comments