SynthMaker

String Array

Archive · 2010 10 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

mwvdlee ·

Based on this discussion: *FIXED* Comma's in string arrays

What I request is a new primitive that takes as two Strings "Text" and "Delimiter" as input and outputs a String Array. If Text is a zero-length string, output contains nothing. If a zero-length string is given for Delimiter, the output contains one line, containing the entire unchanged content of Text. Else (and the most likely usage scenario) if Delimiter is a non-zero-length string, the output may contain multiple lines where each line is part of the input, delimited by the string specified in Delimiter. The Delimiter string itself is not in the output.

Alternatively, a primitive that does not take a Delimiter string but splits line at Newline would also be fine, although a user-specified delimiter would be more flexible and likely allow other common operations to benefit from increased performance.

The reason for this request is that the automatic conversion of String datatype to String Array datatype delimits the lines by both newlines and the comma (',') character. Depending on the situation, linebreaking on either character may be unwanted.

rl ·

vote++

sunsynth ·

yup, i'm on board 2++

trogluddite ·

And Another+

TomC ·

Just do make this clear: the delimiter should be a String, that means a delimiter could be longer than one single character.

Of course another ++

Tom

aliasant ·

+1

exonerate ·

Such a primitive is definitely needed. 🙂

infuzion ·

+1 delimit by only user-defined character, not by whitespace primitive

mwvdlee ·

infuzion wrote: +1 delimit by only user-defined character, not by whitespace primitive

I thought the NL primitive matched only NL (0x0A) and was essentially similar to a string constant?

oddson ·

mwvdlee wrote: infuzion wrote: +1 delimit by only user-defined character, not by whitespace primitive

I thought the NL primitive matched only NL (0x0A) and was essentially similar to a string constant?

Me too... AFAIK it's only there because you can't type return into a String primitive (although you can in the text).

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.