Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script API: implement String.Remove(from, count) #2539

Open
ivan-mogilko opened this issue Sep 26, 2024 · 1 comment
Open

Script API: implement String.Remove(from, count) #2539

ivan-mogilko opened this issue Sep 26, 2024 · 1 comment
Labels
ags 4 related to the ags4 development context: script api

Comments

@ivan-mogilko
Copy link
Contributor

Sometimes there's a case where you want to cut a piece of string in the middle. This is doable via mix of Substring and Append, but would be nice to have a function that just does this itself.

Suggested prototype:

String String.Remove(int startIndex, int count = -1);

if count is passed as < 0 (default), then this will remove everything starting with startIndex.

@ericoporto
Copy link
Member

Afaict the idea is to implement exactly https://learn.microsoft.com/en-us/dotnet/api/system.string.remove?view=net-8.0

@ivan-mogilko ivan-mogilko added the ags 4 related to the ags4 development label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ags 4 related to the ags4 development context: script api
Projects
None yet
Development

No branches or pull requests

2 participants