Top index Wirbel home

::bisplit

string.bisplit(delim) - split string into exactly two parts

string.bisplit(delim) splits a string s into exactly two parts at the first occurance of delimiter delim and returns a pair of strings. If the delim d is not contained in s then the second return string will be emtpy. bisplit is a conveniance function usefull for tuple assignment. The delimiter can either be a string or a character.

Examples

left,right = "one|two".bisplit('|')

See also

rbisplit, split