Closed sjbarag closed 5 years ago
Same deal as #43: I've marked this as "Good first issue" because we have a pretty good pattern around global functions now. Also note that -- because this is a first issue -- a first-time contributor doesn't have to implement all of these at once. That's a pretty big undertaking. We can always split this into multiple issues to handle families of string functions (e.g. "all the ones that pad strings")
We've already got four of these, but it'd be great if we had a few more! Specifically, there's a bunch of [global string functions]() in BrightScript:
Instr(start as Integer, text as String, substring as String) as Integer
Left(s as String, n as Integer) as String
Len(s as String) as Integer
Mid(s as String, p as Integer, [n as Integer]) as String
Right(s as String, n as Integer) as String
Str(value as Float) as String
StrI(value as Integer) as String
StrI(value as Integer, radix as Integer) as String
String(n as Integer, str as String ) as String
StringI(n as Integer, ch as Integer) as String
Val(s as String) as Float
Val(str as String, radix as Integer) as Integer
Substitute(str as String, arg0 as String, arg1 = "" as String, arg2 = "" as String, arg3 = "" as String) as String