Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
C++
String 117 codes
Home
C++
String
1 A short string demonstration
2 Access the contents of a string using iterators
3 Accessing Character Elements of an STL String
4 Accessing characters in a string
5 Append two strings
6 Ask for a persons name, and generate a framed greeting
7 Changing Case in Strings
8 Char Escapes
9 Compare string ignoring the case
10 Compare strings
11 Compare strings by index
12 Compare sub string
13 Concatenate Using STL string
14 Concatenating Strings
15 Convert char array to upper case
16 Convert string to C-Style string
17 Copy char array from a string to a char pointer
18 Copy constructor
19 Copying Strings
20 Count spaces, punctuation, digits, and letters
21 Create an iterator to a string and Use it to cycle through the characters of a string
22 Define a string variable, assign a value and display it
23 Demonstrate insert(), erase(), and replace()
24 Demonstrate the basic null-terminated string functions
25 Demonstrating member function at
26 Display the characters in a string one at a time by using the indexing operator
27 Equivalent of strcspn() and strpbrk()
28 Equivalent of strspn()
29 Erase a range of characters using an overloaded version of erase()
30 Extracting Words in Strings Delimited by Whitespace
31 Filling an Array
32 Find substring day in a string and check if it was found
33 Find the first of any of these chars
34 Find the first of any of these chars starting from the end
35 Find the first thats not in this set
36 Find the first thats not in this set, starting from the end
37 Get a C-Style String from a C++ String
38 Get char array with cin getline
39 Get lengh of a C++ string
40 Get the string length
41 Increment the iterator
42 Initializing, Assigning (Copying), and Concatenating Strings Using std
43 Input a string via cin
44 Insert into str by using the iterator version of insert()
45 Insert one string at location 10 of another string
46 Insert one string into another
47 Loop through the string array
48 Modify char in a string by indexer
49 Obtain a substring
50 Operator pointer
51 Output a string with copy function
52 Overloaded string concatenation operator
53 Overloaded string concatenation operator with C-style string
54 Passing Arguments by Value
55 Print characters read from keyboard in reverse order
56 Read string in and then output
57 Replace all spaces with period
58 Return true if c1 c2 (ignoring case), false otherwise
59 Return true if c1 equals c2 (regardless of case), false otherwise
60 Reverse a string in place
61 Reverse the order of all characters inside the string
62 Reversing a String and Finding its Length
63 Reversing an STL String
64 Search a sub string
65 Search from the beginning
66 Search from the end
67 Set with functor for string comparison
68 Sort all characters inside the string
69 Split file name in command line into base name and extension
70 STL string Instantiation and Copy Techniques
71 String
72 String assignment
73 String basics
74 String class
75 String erase(6,9)
76 String find(substring)
77 String find_first_not_of( substring )
78 String find_first_of( substring )
79 String find_last_of(substring)
80 String insert( 3, string4, 0, string
81 String insert()
82 String member function empty
83 String member function substr
84 String overloaded +=
85 String overloaded equality and relational operators
86 String replace( position, 2, 12345;;123, 5, 2 )
87 String replace()
88 String resize()
89 String rfind(substring)
90 String search with custom comparison function
91 String size grows
92 String size()
93 String size(), string length, string capacity(), string max_size()
94 Substr to-end-of-string option
95 Switch statement based on char value
96 Tests whether a string is a palindrome
97 Use == and to compare strings
98 Use a reverse iterator to display the string in reverse
99 Use char pointer to point to the char array returned from string data()
100 Use cin to read string
101 Use erase to remove all characters from (and including) location 6 through the end of string1
102 Use iterator
103 Use of as istream_iterator iterator
104 Use std
105 Use string compare to compare two strings
106 Use string length() to check the strings size
107 Use strlen() to get the length of a char array buffer
108 Use the STL find() algorithm to obtain an iterator to the start of the first a
109 Using an iterator to output a string
110 Using atoi() function
111 Using find with reverse iteration
112 Using strcat() and strncat()
113 Using strcpy and string terminator
114 Using strcpy() to assign value from one char array to another char array
115 Using string swap function to swap two strings
116 Using strncpy() and string terminator
117 Using strncpy() to assign one char array to another char array