String

222
3291 reads

February 13, 2013

string functions


this example shows how to use simple functions of a string like hashing string to MD5 and breaking it down with respect to a known delimiter like whitespace

132
2396 reads

February 13, 2013

399
5796 reads

February 13, 2013

string initialization and concatination


this example shows how to initialize a string and concatenates strings using the dot '.' operator

53
2269 reads

February 13, 2013

String comparison methods


This program illusrates the use of Strings & related methods.
Method used in line 18 is:
boolean regionMatches(int startIndex, String str2,int str2StartIndex,int numChars)

59
2275 reads

February 13, 2013

StringBuffer and related methods


This program shows the use of String Buffer and all its related methods.

22
1664 reads

February 13, 2013

String Find Function


This example demonstrates the string::find functionality.

24
1741 reads

February 13, 2013

String To Int


This example demonstrates the conversion of string to int.
There are many ways to do it. I don't know exactly which one is the best, but here is the fastest one:

std::string myString = "45";

59
2289 reads

February 13, 2013

Use of toString()


This example demonstrates the use of toString() method. Here Box's toString() method is automatically invoked when a Box object is used in a concatenation expression or in a call to println().

29
1624 reads

February 13, 2013

String Insert Function


This example demonstrates the use of string.

289
4203 reads

February 12, 2013

Palindrome String


In this example, we enter a word and check whether it is palindrome or not.
We check by reversing the given word and storing it in another variable and then
comparing both string.