Logo

Programming-Idioms

History of Idiom 169 > diff from v3 to v4

Edit summary for version 4 by steenslag:
New Ruby implementation by user [steenslag]

Version 3

2018-01-09, 17:09:09

Version 4

2018-01-09, 21:49: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.

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.

Extra Keywords
size
Extra Keywords
size
Code
n = s.length
Comments bubble
n = s.size is the same