Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

khchen
Copy link

@khchen khchen commented Jul 8, 2022

  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