Len
Length = Len(String$)
 
Parameters:

    String$ = The string you wish to calculate the length of
Returns:

    Length = The length in characters of the input string
 

      Len() is used to calculate the size of a string in characters.



FACTS:


      * A string size of zero means this string is empty and contains nothing. This is also referred to as a "NULL" string. Which can be represented as a pair of quotes like this ""




Mini Tutorial:


  
; display the number of characters the string "Hello" has in it.
  Print Len("Hello")
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output.

  
  5
  




 
Example Source: Download This Example
; ------------------------------------------
; LEN() EXAMPLE
; ------------------------------------------
  
; Create a String Variable called "SourceString$" and place the text "Play Basic" within
; it.
  
  SourceString$= "Play Basic"
  
; Display the SourceString$ variable
  Print SourceString$
  
; Display the Length of the string in charcters.
  
  Print Len(SourceString$)
  
  
; Show Us the Screen And Wait For Key Input before ending
  Sync
  WaitKey
  
  
  
 
Related Info: :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com