Top "String" questions

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

How to convert std::string to lower case?

I want to convert a std::string to lowercase. I am aware of the function tolower(), however in the past …

c++ string c++-standard-library tolower
String concatenation: concat() vs "+" operator

Assuming String a and b: a += b a = a.concat(b) Under the hood, are they the same thing? Here …

java string concatenation
How can I check if a single character appears in a string?

In Java is there a way to check the condition: "Does this single character appear at all in string x" …

java validation string character
How to find if an array contains a specific string in JavaScript/jQuery?

Can someone tell me how to detect if "specialword" appears in an array? Example: categories: [ "specialword" "word1" "word2" ]

javascript jquery arrays string
Adding a newline into a string in C#

I have a string. string strToProcess = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@"; I need to add a newline after every occurence …

c# string
Check whether a string is not null and not empty

How can I check whether a string is not null and not empty? public void doStuff(String str) { if (str != …

java string string-comparison
Convert character to ASCII numeric value in java

I have String name = "admin"; then I do String charValue = name.substring(0,1); //charValue="a" I want to convert the charValue …

java string ascii
std::string to char*

I want to convert a std::string into a char* or char[] data type. std::string str = "string"; char* chr = …

c++ string char
How to convert/parse from String to char in java?

How do I parse a String value to a char type, in Java? I know how to do it to …

java string parsing char
Remove final character from string

Let's say my string is 10 characters long. How do I remove the last character? If my string is "abcdefghij" (I …

python string