Top "String" questions

A string is a finite sequence of symbols, commonly used for text, though sometimes for arbitrary data.

Check if a string contains a string in C++

I have a variable of type std::string. I want to check if it contains a certain std::string. How …

c++ string substring
string to string array conversion in java

I have a string = "name"; I want to convert into a string array. How do I do it? Is there …

java arrays string split
Convert a list of characters into a string

If I have a list of chars: a = ['a','b','c','d'] How do I convert it into a single …

python string
How to extract the substring between two markers?

Let's say I have a string 'gfgfdAAA1234ZZZuijjk' and I want to extract just the '1234' part. I only …

python string substring
How to check whether a string contains a substring in Ruby

I have a string variable with content: varMessage = "hi/thsid/sdfhsjdf/dfjsd/sdjfsdn\n" "/my/name/is/balaji.so\n" "…

ruby string
Convert JSON string to dict using Python

I'm a little bit confused with JSON in Python. To me, it seems like a dictionary, and for that reason …

python json string
Split string on whitespace in Python

I'm looking for the Python equivalent of String str = "many fancy word \nhello \thi"; String whiteSpaceRegex = "\\s"; String[] words = str.…

python regex string split whitespace
How to split a String by space

I need to split my String by spaces. For this I tried: str = "Hello I'm your String"; String[] splited = str.…

java string split arrays
How can I exclude one word with grep?

I need something like: grep ^"unwanted_word"XXXXXXXX

regex string search grep
Java: how to initialize String[]?

Error % javac StringTest.java StringTest.java:4: variable errorSoon might not have been initialized errorSoon[0] = "Error, why?"; Code public class StringTest { …

java string initialization