String to Array - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Utilities (https://staging.qb64phoenix.com/forumdisplay.php?fid=8) +---- Thread: String to Array (/showthread.php?tid=1470) |
String to Array - AtomicSlaughter - 02-13-2023 A Handy piece of code that will split a string into an array. Code: (Select All) Sub StringSplitter (ST As String, AR() As String, DL As String) RE: String to Array - mnrvovrfc - 02-13-2023 Nice routine but why need an array at all for delimeters? Could replace Code: (Select All) If Mid$(ST, c, 1) = Delim(i) Then with Code: (Select All) If Mid$(ST, c, 1) = Mid$(DL, i, 1) Then Your way would be better if the "delimeter" is allowed to be more than one character. |