Category talk:Wren-str: Difference between revisions

Fixed minor bug in Greek.names property and added Str.splitNoEmpty method.
(→‎Source code: Added Utf8.fromWin1252 method.)
(Fixed minor bug in Greek.names property and added Str.splitNoEmpty method.)
Line 415:
if (final > 0) res.add(sub(s, first..-1))
return res
}
 
// Splits 's' into a list of one or more strings separated by 'sep' but removes
// any empty elements from the list.
static splitNoEmpty(s, sep) {
if (!(s is String)) s = "%(s)"
if (!(sep is String) || sep.isEmpty) Fiber.abort("Separator must be a non-empty string.")
var split = s.split(sep)
return split.where { |e| !e.isEmpty }.toList
}
 
Line 597 ⟶ 606:
return [
"alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta",
"0iotaiota", "kappa", "lambda", "mu", "nu", "xi", "omicron", "pi",
"rho", "sigma final", "sigma", "tau", "upsilon", "phi", "chi", "psi", "omega"
]
9,476

edits