Top "Substring" questions

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

Time complexity of Java's substring()

What is the time complexity of the String#substring() method in Java?

java substring time-complexity
Find all substrings that are palindromes

If the input is 'abba' then the possible palindromes are a, b, b, a, bb, abba. I understand that determining …

java algorithm substring palindrome
How to use substringToIndex in Swift?

I get compiler error at this line: UIDevice.currentDevice().identifierForVendor.UUIDString.substringToIndex(8) Type 'String.Index' does not conform to protocol …

swift substring
Number of occurrences of a substring in an NSString?

How can I get the number of times an NSString (for example, @"cake") appears in a larger NSString (for example, @"…

objective-c cocoa nsstring substring
Cutting a string at nth occurrence of a character

What I want to do is take a string such as this.those.that and get a substring to or …

javascript string substring slice
extract a substring from clob in oracle

I have a clob with data <?xml version='1.0' encoding='UTF-8'?><root available-locales="en_US" …

oracle substring database clob
LINQ: Group by month and year within a datetime field

I have a table with a datetime field. I want to retrieve a result set grouped by the month/year …

linq tsql group-by substring
Conditional substring in a Jinja2 template

When deploying with ansible, There's 1 specific case where I need to strip a string of a trailing -p substring. The …

substring ansible jinja2
What is the difference between String.subString() and String.subSequence()

String.subSequence() has the following javadoc: Returns a new character sequence that is a subsequence of this sequence. An invocation …

java string substring subsequence
Which String method: "contains" or "indexOf > -1"?

Which of the following ways is an efficient way of determining substring containment? if (str.indexOf("/") > -1) or if (…

java string substring