Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
Select your favorite languages :
  • Or search :

Idiom #283 Split with a custom string separator

Build the list parts consisting of substrings of input string s, separated by the string sep.

let parts = s.split(sep);
let parts: Vec<&str> = s.split(sep).collect();
let parts = s.split(sep).collect::<Vec<&str>>();
(def parts (clojure.string/split s sep))
var parts = s.split(sep);
import "strings"
parts := strings.Split(s, sep)
const parts = s.split(sep);
uses sysutils;
parts := s.split([sep]); 
parts = s.split(sep)
parts = s.split(sep)

New implementation...