Skip to content

[Enhancement] modify stringSplit to support \x00 and empty string#274

Open
khchen wants to merge 2 commits into
ThakeeNathees:masterfrom
khchen:stringsplit
Open

[Enhancement] modify stringSplit to support \x00 and empty string#274
khchen wants to merge 2 commits into
ThakeeNathees:masterfrom
khchen:stringsplit

Conversation

@khchen

@khchen khchen commented Jul 8, 2022

Copy link
Copy Markdown
  1. String in pocketlang could be include \x00, but String.split() don't.
  2. If [sep] is empty, split string into characters.
  3. String.split should be the opposite of List.join perfectly.

Example:

print("a\x00b\x00c".split('\x00'))
print("abcde".split())

Output:

["a", "b", "c"]
["a", "b", "c", "d", "e"]

@khchen khchen changed the title modify stringSplit to support \x00 and empty string [Enhancement] modify stringSplit to support \x00 and empty string Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant