Str has a split method (very handy), but no static join method (also very handy).
Str
split
join
Str join(Str[] arr, Str separator := ",")
join is on List, from docCookbook:
x := ['a', 'b', 'c'] x.join // returns "979899" x.join(",") // returns "97,98,99" x.join(",") |Int v->Str| { return v.toChar } // returns "a,b,c" x.join("-", &Int.toChar) // returns "a-b-c"
yeah, I realized that after I posted my question. Obviously List is a better place for that method to live.
Login or Signup to reply.
mike Thu 1 May 2008
Str
has asplit
method (very handy), but no staticjoin
method (also very handy).Str join(Str[] arr, Str separator := ",")
brian Thu 1 May 2008
join is on List, from docCookbook:
mike Thu 1 May 2008
yeah, I realized that after I posted my question. Obviously List is a better place for that method to live.