( string_split )
Legend
| → | Has corresponding code |
| → | No direct match, but an alternative exists |
| → | No corresponding code |
| - | TODO |
| ( .. ) | Not localized |
| Example | Python pytest |
C++ GoogleTest |
Swift Testing |
Kotlin jUnit |
Bash bats |
|---|---|---|---|---|---|
| ( string_split_to_characters ) | list(s) | - | - | - | - |
| ( string_split_with_separator ) | s.split(d) | - | - | - | - |
| ( string_split_with_regexp ) | re.split(d, s) | - | - | - | - |
| ( split_words ) | s.split() | - | - | - | - |
| ( string_split_lines ) | split lines | - | - | - | - |
| ( slice_from_m_to_n ) | text[m:n+1] | s.substr(m, n - m + 1) | - | - | - |
| ( slice_from_m_to_end ) | text[m:] | s.substr(m) | - | - | - |
| ( slice_from_m_with_length ) | text[m:m+length] | s.substr(m, length) | - | - | - |
| ( take_first_n ) | text[:n] | - | - | - | - |
| ( take_last_n ) | text[-n:] | s.substr(s.size() - n) | - | - | - |
| ( drop_first_n ) | text[n:] | s.substr(n) | - | - | - |
| ( drop_last_n ) | text[:-n] | s.substr(0, s.size() - n) | - | - | - |
| ( slice_out_of_range ) | does not raise | - | - | - | - |
| ( split_when_last_element_is_empty ) | → | - | - | - | - |