1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-09-03 03:33:15 +02:00

[awk] Fix example output for split (in all languages) (#5390)

* [awk] update comment with split result

* [awk/fr] update comment about split result

* [awk/uk] update output from split example

* Update awk.md
This commit is contained in:
Piotr Paradziński
2025-09-02 09:51:44 +02:00
committed by GitHub
parent b5b1d6f99f
commit 25e01117dd
3 changed files with 3 additions and 3 deletions

2
awk.md
View File

@@ -217,7 +217,7 @@ function string_functions( localvar, arr) {
# Split on a delimiter
n = split("foo-bar-baz", arr, "-");
# result: a[1] = "foo"; a[2] = "bar"; a[3] = "baz"; n = 3
# result: arr[1] = "foo"; arr[2] = "bar"; arr[3] = "baz"; n = 3
# Other useful stuff
sprintf("%s %d %d %d", "Testing", 1, 2, 3); # => "Testing 1 2 3"

View File

@@ -222,7 +222,7 @@ function string_functions( localvar, arr) {
# Séparer par un délimiteur
n = split("foo-bar-baz", arr, "-");
# résultat : a[1] = "foo"; a[2] = "bar"; a[3] = "baz"; n = 3
# résultat : arr[1] = "foo"; arr[2] = "bar"; arr[3] = "baz"; n = 3
# Autre astuces utiles
sprintf("%s %d %d %d", "Testing", 1, 2, 3); # => "Testing 1 2 3"

View File

@@ -222,7 +222,7 @@ function string_functions( localvar, arr) {
match(localvar, "t"); # => 4, оскільки 't' є четвертим символом
# Розбити рядок за роздільником
n = split("foo-bar-baz", arr, "-"); # a[1] = "foo"; a[2] = "bar"; a[3] = "baz"; n = 3
n = split("foo-bar-baz", arr, "-"); # arr[1] = "foo"; arr[2] = "bar"; arr[3] = "baz"; n = 3
# Інші корисні речі
sprintf("%s %d %d %d", "Testing", 1, 2, 3); # => "Testing 1 2 3"