Top "Substring" questions

Part of a string, or the function/method that returns part of a string

Why does substring slicing with index out of range work?

Why doesn't 'example'[999:9999] result in error? Since 'example'[9] does, what is the motivation behind it? From this behavior I can …

python string substring
Pascal substr equivalent

I was looking for a Pascal equivalent for (for example) the php's substr function, which works like this: $new_string = …

substring pascal substr
Swift 4 'substring(from:)' is deprecated: Please use String slicing subscript with a 'partial range from' operator

i've just converted my little app but i've found this error: 'substring(from:)' is deprecated: Please use String slicing …

swift substring deprecated swift4
Replace substring (replaceAll) workaround

I'm trying to replace a substring that contains the char "$". I'd be glad to hear why it didnt works that …

java string substring replaceall
Javascript: find word in string

Does Javascript have a built-in function to see if a word is present in a string? I'm not looking for …

javascript substring word
Index and length must refer to a location within the string error in substring

I have a string like this: 2899 8761 014 00:00:00 06/03/13 09:35 G918884770707. I have to take the substring G918884770707 from this given string. I know …

c# .net string substring string-length
Does Python have a cleaner way to express "if x contains a|b|c|d..."?

The Pythonic way to check if a string x is a substring of y is: if x in y: Finding …

python if-statement python-3.x substring
How can I truncate data to fit into a field using SQL*Loader? (ORA-12899)

Using Oracle SQL*Loader, I am trying to load a column that was a variable length string (lob) in another …

substring truncate sql-loader ora-12899
Kotlin: How do I get characters after "@" in a string?

I have a string that is an email. I want to be able to get the domain part of the …

android string kotlin substring string-interpolation
Algorithm to get a list of all words that are anagrams of all substrings (scrabble)?

Eg if input string is helloworld I want the output to be like: do he we low hell hold roll …

substring anagram