You need to sign in to do that
Don't have an account?
Andrei Ionut Militaru
String processing
Hello guys,
I'm trying to find out if there's a way to remove a certain number of characters from a string.
Challenge is, let's say we have string str = 'I get 7 hours of sleep'. I want to remove 'I get x' meaning that I want to remove 'I get' ( which will always be 'I get' ) and another 2 characters ( whatever they are, including the space between ).
I'm trying to do this with:
str.removeStartIgnoreCase('I GET '); - but can't find a way to tell the code about the next 2 characters, which I want removed from str.
Does this make sense?
I'm trying to find out if there's a way to remove a certain number of characters from a string.
Challenge is, let's say we have string str = 'I get 7 hours of sleep'. I want to remove 'I get x' meaning that I want to remove 'I get' ( which will always be 'I get' ) and another 2 characters ( whatever they are, including the space between ).
I'm trying to do this with:
str.removeStartIgnoreCase('I GET '); - but can't find a way to tell the code about the next 2 characters, which I want removed from str.
Does this make sense?
Try this ,
All Answers
Try this ,
I've ended up doing something pretty similar right after posting it on the community and fixed it.
Thanks a lot for your answer, I've marked it in case anybody else is having this issue.
Cheers.