Logo

Programming-Idioms

History of Idiom 169 > diff from v28 to v29

Edit summary for version 29 by Okx:
New Elixir implementation by user [Okx]

Version 28

2018-03-10, 23:16:20

Version 29

2018-03-21, 21:05:03

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 = String.length s
Doc URL
https://hexdocs.pm/elixir/String.html#length/1
Demo URL
https://tio.run/##S83JrMgs@l@sYKug5JGak5Ov9D8PyA4uKcrMS9fLSc1LL8lQKP7v6a9XUFpSrJD3HwA