Top "Substring" questions

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

How to split a string at the first `/` (slash) and surround part of it in a `<span>`?

I want to format this date: <div id="date">23/05/2013</div>. First I want to split the …

javascript jquery date split substring
Get a substring of a char*

For example, I have this char *buff = "this is a test string"; and want to get "test". How can I …

c char substring
How do I check if a string contains another string in Objective-C?

How can I check if a string (NSString) contains another smaller string? I was hoping for something like: NSString *string = @"…

ios objective-c string range substring
How do I get the last character of a string?

How do I get the last character of a string? public class Main { public static void main(String[] args) { String …

java string substring
How to Select a substring in Oracle SQL up to a specific character?

Say I have a table column that has results like: ABC_blahblahblah DEFGH_moreblahblahblah IJKLMNOP_moremoremoremore I would like to …

sql oracle substring trim
How to get a string after a specific substring?

How can I get a string after a specific substring? For example, I want to get the string after "world" …

python string substring
How to get first 5 characters from string

How to get first 5 characters from string using php $myStr = "HelloWordl"; result should be like this $result = "Hello";

php substring
Java - removing first character of a string

In Java, I have a String: Jamaica I would like to remove the first character of the string and then …

java string substring
Find string between two substrings

How do I find a string between two substrings ('123STRINGabc' -> 'STRING')? My current method is like this: &…

string python substring
How do I check if a string contains another string in Swift?

In Objective-C the code to check for a substring in an NSString is: NSString *string = @"hello Swift"; NSRange textRange =[string …

swift string nsstring substring