Top "Substring" questions

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

How do I check if a C++ std::string starts with a certain string, and convert a substring to an int?

How do I implement the following (Python pseudocode) in C++? if argv[1].startswith('--foo='): foo_value = int(argv[1][len(…

c++ string parsing substring startswith
Remove last character from C++ string

How can I remove last character from a C++ string? I tried st = substr(st.length()-1); But it didn't …

c++ string substring
Java substring: 'string index out of range'

I'm guessing I'm getting this error because the string is trying to substring a null value. But wouldn't the ".length() &…

java substring indexoutofboundsexception
Fastest way to remove first char in a String

Say we have the following string string data= "/temp string"; If we want to remove the first character / we can …

c# string substring performance trim
How to get a substring between two strings in PHP?

I need a function that returns the substring between two words (or two characters). I'm wondering whether there is a …

php substring
Get Substring - everything before certain char

I'm trying to figure out the best way to get everything before the - character in a string. Some example …

c# string substring
PHP substring extraction. Get the string before the first '/' or the whole string

I am trying to extract a substring. I need some help with doing it in PHP. Here are some sample …

php string substring
How to find if an array contains a string

Possible Duplicate: How to search for string in MS Access VBA array I am currently working on an Excel macro, …

arrays vba substring
Extract only right most n letters from a string

How can I extract a substring which is composed of the rightmost six letters from another string? Ex: my string …

c# string substring
How to trim a file extension from a String in JavaScript?

For example, assuming that x = filename.jpg, I want to get filename, where filename could be any file name (Let's …

javascript replace substring substr indexof