@@ -223,7 +223,7 @@ Methods to Change Case
223
223
224
224
// changes all graphemes/code points to "title case"
225
225
u('foo ijssel')->title(); // 'Foo ijssel'
226
- u('foo ijssel')->title(true); // 'Foo Ijssel'
226
+ u('foo ijssel')->title(allWords: true); // 'Foo Ijssel'
227
227
// changes all graphemes/code points to "title case" according to locale-specific case mappings
228
228
u('foo ijssel')->localeTitle('en'); // 'Foo ijssel'
229
229
u('foo ijssel')->localeTitle('nl'); // 'Foo IJssel'
@@ -271,18 +271,18 @@ Methods to Append and Prepend
271
271
// returns the contents found before/after the first occurrence of the given string
272
272
u('hello world')->before('world'); // 'hello '
273
273
u('hello world')->before('o'); // 'hell'
274
- u('hello world')->before('o', true); // 'hello'
274
+ u('hello world')->before('o', includeNeedle: true); // 'hello'
275
275
276
276
u('hello world')->after('hello'); // ' world'
277
277
u('hello world')->after('o'); // ' world'
278
- u('hello world')->after('o', true); // 'o world'
278
+ u('hello world')->after('o', includeNeedle: true); // 'o world'
279
279
280
280
// returns the contents found before/after the last occurrence of the given string
281
281
u('hello world')->beforeLast('o'); // 'hello w'
282
- u('hello world')->beforeLast('o', true); // 'hello wo'
282
+ u('hello world')->beforeLast('o', includeNeedle: true); // 'hello wo'
283
283
284
284
u('hello world')->afterLast('o'); // 'rld'
285
- u('hello world')->afterLast('o', true); // 'orld'
285
+ u('hello world')->afterLast('o', includeNeedle: true); // 'orld'
286
286
287
287
Methods to Pad and Trim
288
288
~~~~~~~~~~~~~~~~~~~~~~~
@@ -398,14 +398,14 @@ Methods to Join, Split, Truncate and Reverse
398
398
u('Lorem Ipsum')->truncate(8, '…'); // 'Lorem I…'
399
399
// if the third argument is false, the last word before the cut is kept
400
400
// 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'
402
402
403
403
::
404
404
405
405
// breaks the string into lines of the given length
406
406
u('Lorem Ipsum')->wordwrap(4); // 'Lorem\nIpsum'
407
407
// 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'
409
409
410
410
// replaces a portion of the string with the given contents:
411
411
// the second argument is the position where the replacement starts;
0 commit comments