String length by #1742

This commit is contained in:
ven 2016-06-16 15:19:43 +02:00 committed by GitHub
parent b3b5ece63c
commit 5affe64801

View File

@ -119,6 +119,9 @@ b == a # => True, a's and b's objects are equal
# A string can be treated like a list of characters # A string can be treated like a list of characters
"This is a string"[0] # => 'T' "This is a string"[0] # => 'T'
# You can find the length of a string
len("This is a string") # => 16
# .format can be used to format strings, like this: # .format can be used to format strings, like this:
"{} can be {}".format("Strings", "interpolated") # => "Strings can be interpolated" "{} can be {}".format("Strings", "interpolated") # => "Strings can be interpolated"