xxxxxxxxxx
string s = "Corona123";
int sizeOfString = s.Length;
xxxxxxxxxx
string name = "Anthony";
int nameLength = name.Length;
Console.WriteLine("The name " + name + " contains " + nameLength + "letters.");
xxxxxxxxxx
string string1 = "A man i hurry just jumped on a tail of a dog and dog has bitten him damagingly";
//get length if string
Console.WriteLine(string1.Length);
xxxxxxxxxx
val stringVar = "What is the length of this string?"
println(stringVar.length())
xxxxxxxxxx
string text = "Hello, World!";
int length = text.Length;
Console.WriteLine(length);
xxxxxxxxxx
string a = "One example";
Console.WriteLine("LENGTH: " + a.Length);
// This code outputs 11
The length of a string can be found using the len() built-in function. This length indicates the number of characters in the string:
xxxxxxxxxx
random_string = "I am Batman" # 11 characters
print(len(random_string))
xxxxxxxxxx
string name = "a622AgIdZg32glo3s5ndsS7N7T233U6AWOKp5VWbevkd6xog7gbaBe3xdf3fXPP";
int nameLength = name.Length;
Console.WriteLine("The name " + name + " contains " + nameLength + "letters.");