Files
BlitzNext/_release/help/commands/2d_commands/Len.htm
T
2014-02-26 16:08:39 +13:00

4 lines
1.4 KiB
HTML

<html><head><title>Command: Len </title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='../css/commands.css' type='text/css'></head><body><span class='Command'>&nbsp;&nbsp;Len (string$)&nbsp;&nbsp;</span></p><span class='header'>Definition:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Returns the number of characters in a string.</td></tr></table><span class='header'><br>Parameter Description:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>string$ = any valid string variable</td></tr></table><p class='header'>Command Description: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>This will let you determine the length (number of letters, spaces, characters, numbers, etc) inside a string. You can use this to ensure the player enters the right number of letters (like 3 letters for a high score table). Quite useful for 'string parsing' with other commands.</td></tr></table><p class='header'>Example: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>name$="Shane Monroe"<br>
Print "There are " + Len(name$) + " characters in your name!"<br></td></tr></table><p><b><a target="_top" href="../index.htm">Index</a></b></p></body>
</html>