string lenght in scala code example Example: scala length of string var palindrome = "Dot saw I was Tod"; var len = palindrome.length();