Skip to content

Commit 845b6c4

Browse files
committed
minor #12790 Fix UnicodeString::before() example (jdreesen)
This PR was merged into the 5.0 branch. Discussion ---------- Fix `UnicodeString::before()` example If I'm not mistaken, the result of `u('hello world')->before('o');` would be `'hell'` instead of `'hell '`. Commits ------- 9322a00 Fix output of before() example
2 parents b04c20b + 9322a00 commit 845b6c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/string.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Methods to Append and Prepend
238238

239239
// returns the contents found before/after the first occurrence of the given string
240240
u('hello world')->before('world'); // 'hello '
241-
u('hello world')->before('o'); // 'hell '
241+
u('hello world')->before('o'); // 'hell'
242242
u('hello world')->before('o', true); // 'hello'
243243

244244
u('hello world')->after('hello'); // ' world'

0 commit comments

Comments
 (0)