Len: Difference between revisions
Jump to navigation
Jump to search
C185driver (talk | contribs) |
|||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
Len returns | Len returns an integer specifying the number of characters in a string, or the number of elements in an array. | ||
== Example (Basic) == | == Example (Basic) == |
Revision as of 19:37, 4 March 2017
Len(string | variable)
Description
Len returns an integer specifying the number of characters in a string, or the number of elements in an array.
Example (Basic)
Rem Len Example 'Len returns string length or variable size Dim Frog, Survived Frog = "Staring" Survived = 2 Print "Len of Frog:", Len(Frog) Print "LenB of Frog:", LenB(Frog) Print "Len of Survived:", Len(Survived)
Example (JavaScript)
// Len Example /* Len returns string length or variable size */ var Frog, Survived; Frog = "Staring"; Survived = 2; NSB.Print("Len of Frog:" + " " + Frog.length); NSB.Print("LenB of Frog:" + " " + Frog.length); NSB.Print("Len of Survived:" + " " + Survived.toString().length);
Output
Len of Frog: 7 LenB of Frog: 7 Len of Survived: 1