Logo

Programming-Idioms

History of Idiom 169 > diff from v81 to v82

Edit summary for version 82 by programming-idioms.org:
[VB] Sample value not needed

Version 81

2020-11-06, 09:12:14

Version 82

2020-11-06, 09:13:54

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.

Variables
n,s
Variables
n,s
Extra Keywords
size characters chars number runes
Extra Keywords
size characters chars number runes
Code
Dim s As String = "1234567"
Dim n As Integer = s.Length
Code
Dim n As Integer = s.Length