Logo

Programming-Idioms

History of Idiom 169 > diff from v72 to v73

Edit summary for version 73 by silver-dragon:
[VB] changed the var names to match the lead paragraph

Version 72

2019-09-29, 01:31:03

Version 73

2019-09-30, 19:54:45

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
Code
Dim temp As String = "1234567890"
Console.WriteLine(temp.Length)
Code
Dim s As String = "1234567"
Dim n As Integer = s.Length