EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2014
12:43 AM
Minor bug: roRegex.split() loses empty strings at the end
What subject says - there is some issue with regex.split(), where it will lose the last few substrings that are empty. fw5 and 3.
Here is example - note each string contains 2 colons and thus should be split in 3 substrings and output should've been all 3s:
Here is example - note each string contains 2 colons and thus should be split in 3 substrings and output should've been all 3s:
BrightScript Debugger> re = createObject("roRegex", ":", "")
BrightScript Debugger> for each line in ["1:2:3", ":2:3", "1::3", "1:2:", "1::", "::"]: ? re.split(line).count(): end for
3
3
3
2
1
0