diff options
author | Harshit Gupta <hkg1412@gmail.com> | 2024-04-07 17:33:56 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-07 14:03:56 +0200 |
commit | 2891ecf32dbbed3da3994246ae14cd700d45e6f3 (patch) | |
tree | c683284247fd34b37490f6c1109aa8e6bf16c174 /th-th/pascal.th.html.markdown | |
parent | 0aceb41100448904bcffa10525fcd4b75ad5ffe2 (diff) |
[cpp/en] String length content addition (#4888)
* Add string.length() and string.size() example line
Adds a line under the Strings section to add total string length by
calculating the sum of two strings which have been given on output above
with their sizes found out using string::length() and string::size()
functions, with appropriate comment on this line.
Signed-off-by: Harshit Gupta <hkg1412@gmail.com>
* Add cstring strlen() example
Includes <cstring> header to demonstrate length of a character array
string which is C-compliant by using strlen() function available from
this header supported in C++.
Declared string is initialized with char array size [10] to just fit the
string contents with '\0' terminator.
Signed-off-by: Harshit Gupta <hkg1412@gmail.com>
---------
Signed-off-by: Harshit Gupta <hkg1412@gmail.com>
Diffstat (limited to 'th-th/pascal.th.html.markdown')
0 files changed, 0 insertions, 0 deletions