Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
111 stars 0 forks source link

string parsing features for protoflux #2042

Closed charlie-sans closed 2 weeks ago

charlie-sans commented 2 weeks ago

Is your feature request related to a problem? Please describe.

so i'm making projects which require alot of parsing strings with homemade lexers and parsers. with protoflux i have to reverse the string, do some complex tricks then reverse it again and redo that about 10 times to get what i want.

Describe the solution you'd like

a set of around 3/10 nodes that provide the user to be able to extract the specific parts of a string for formatting or parsing. regex support would greatly be appreciated.

Describe alternatives you've considered

creating a mod that provides a method class so i can use that instead of having 500+ protoflux nodes on my redprint.

Additional Context

No response

Requesters

charlie_san

Zyzyl commented 2 weeks ago

What specific functions would you like the requested set of 3 to 10 nodes to have? For example, are there existing C# methods you'd like ProtoFlux nodes for?

Note, regex support already has an issue https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/403

Banane9 commented 2 weeks ago

Yea, you're gonna have to be more specific on what you actually want

charlie-sans commented 2 weeks ago

ah sorry.

so i hope we can get some functions that allow us to do proper string.split, and things to allow parsing of strings that actualy don't suck

charlie-sans commented 2 weeks ago

it's nearly 11pm so i'm having a hard time thinking of things lol

Nytra commented 2 weeks ago

This would require collections in protoflux https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/572

Frooxius commented 2 weeks ago

This is a bit too vague for us to really do anything. I don't know what kinds of parsing nodes would you need that would help your situation.

Like @Zyzyl mentioned, Regex already has its own issue.

Unless you can provide specific types of nodes you'd want, we'll have to close the issue.

charlie-sans commented 2 weeks ago

ah no worries.

so, with the string features, of course regex has it's own, but i think things like

`s = s.Substring(0, separatorIndex + 1);`

string.substring, or things that allow us to do switch statements with strings would be great.

charlie-sans commented 2 weeks ago

i know of others but i can't remember them.

ProbablePrime commented 2 weeks ago

ProtoFlux has a bunch of string nodes that seem to include what you're after such as substring.

If the string functions you are after output collections(arrays, lists), then those will have to wait for #572

With those items out of the way:

Unless you're able to provide a list of functions that are missing from Resonite that you'd like. We'll have to close this one as a duplicate/already implemented.

In the future, try to create GitHub issues that don't leave any unanswered questions for us, for example in this issue:

Was not answered sufficiently.