Logo

Programming-Idioms

History of Idiom 169 > diff from v47 to v48

Edit summary for version 48 by anonymous:
New C implementation by user [anonymous]

Version 47

2018-09-23, 19:17:01

Version 48

2018-10-01, 12:17:55

Idiom #169 String length

Assign to integer n the number of characters of string s.

This can be different from the number of bytes of s.

Illustration

Idiom #169 String length

Assign to integer n the number of characters of string s.

This can be different from the number of bytes of s.

Illustration
Extra Keywords
size characters chars number runes
Extra Keywords
size characters chars number runes
Imports
#include <string.h>
Code
_n = strlen(_s);