Verse String Split Function
31,300 Views
-
(Input: string).Split(Delimeter: string)<transacts>: []string = if. Delimeter.Length = 0 then. return for. Char : Input do. ToString(Char) var Result: []string = array{} var Start: int = 0 var End: int = 0 if. Input.Length > 0 then. loop: if: InputSlice := Input.Slice[End, End + Delimeter.Length] InputSlice = Delimeter ResultSlice := Input.Slice[Start, End] then: set Result += array{ResultSlice} set End += Delimeter.Length - 1 set Start = End + 1 set End += 1 if. End = Input.Length then. break if: Start <= Input.Length - 1 RemainingSlice := Input.Slice[Start] then. set Result += array{RemainingSlice} return Result(Input: string).Split(Delimeter: string)<transacts>: []string = if. Delimeter.Length = 0 then. return for. Char : Input do. ToString(Char) var Result: []string = array{} var Start: int = 0 var End: int = 0 if. Input.Length > 0 then. loop: if: InputSlice := Input.Slice[End, End + Delimeter.Length] InputSlice = Delimeter ResultSlice := Input.Slice[Start, End] then: set Result += array{ResultSlice} set End += Delimeter.Length - 1 set Start = End + 1 set End += 1 if. End = Input.Length then. break if: Start <= Input.Length - 1 RemainingSlice := Input.Slice[Start] then. set Result += array{RemainingSlice} return Result
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.