Skip to main content
Progzoo.net
Tutorials
Guides
Edit
Java
C#
C++
Perl
PHP
Python
Ruby
VB
Hide Sidebar
Show Sidebar
<Progzoo Sections>
ProgZoo
Tutorials
How to...
Assessments
Help
<Other>
To do list
Recent changes
Random page
Personal
Log in / create account
Views
C++
Discussion
View source
History
Toolbox
What links here
Related changes
Upload file
Special pages
Printable version
C++:String Length
From Progzoo
C++:String Functions
String Length
Equal Strings
Substring
Join Strings
Special Characters
Upper Case
Lower Case
Find Position
Split a String
Formatting
Using Print Formatting
length()
The .length() method counts the number of characters.
.
static void demo(string s){ cout << s << "\t" << s.length() << endl; }
[
Font
] [
Default
] [
Show
] [
Resize
] [
History
] [
Profile
]
test text