Skip to content

Commit b519086

Browse files
committed
prefer 'substring'
Inspired by PR #4286
1 parent 5f7cec1 commit b519086

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/Language/quoting.rakudoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ them in the resulting words:
382382

383383
say qw{"a b" c}.raku; # OUTPUT: «("\"a", "b\"", "c")␤»
384384

385-
Thus, if you wish to preserve quoted sub-strings as single items in the resulting words
385+
Thus, if you wish to preserve quoted substrings as single items in the resulting words
386386
you need to use the C<qww> variant:
387387

388388
say qww{"a b" c}.raku; # OUTPUT: «("a b", "c")␤»
@@ -418,7 +418,7 @@ leaving them in the resulting words:
418418

419419
my $a = 42; say qqw{"$a b" c}.raku; # OUTPUT: «("\"42", "b\"", "c")␤»
420420

421-
Thus, if you wish to preserve quoted sub-strings as single items in the
421+
Thus, if you wish to preserve quoted substrings as single items in the
422422
resulting words you need to use the C<qqww> variant:
423423

424424
my $a = 42; say qqww{"$a b" c}.raku; # OUTPUT: «("42 b", "c")␤»

xt/word-variants.rakutest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ my %variants = %(
4141
smartmatch => rx:i/ << smart [\s+|\-] match /,
4242
subdirectories => rx:i/ << sub \- directories /,
4343
subdirectory => rx:i/ << sub \- directory /,
44+
substring => rx:i/ << sub \- string /,
4445
zero-width => rx:i/ << zero \s+ width<!before ' joiner'><!before ' no-break space'> /,
4546
);
4647

0 commit comments

Comments
 (0)