Visara Master Console Center Scripting Guide Manuel d'utilisateur Page 204

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 262
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 203
Chapter 5 Script Commands
Scripting Guide 204
TRIMSTR
Syntax:
TRIMSTR( $String[, %Where]) ==> $Trimmed
Description:
Removes leading and trailing spaces from a string.
Action:
Returns a character string with leading and/or trailing space
characters removed, depending on the %Where parameter.
Parameters:
$String. String expression. The string to remove leading and/or
trailing spaces from.
%Where. Numeric expression. Optional. Where to remove the spaces
from. Valid constants are BOTH, LEFT, and RIGHT. If not specified,
the default %Where is BOTH.
- BOTH removes leading and trailing spaces. Equivalent to using
both LEFT and RIGHT on the same string: TRIMSTR(
TRIMSTR( $String, LEFT), RIGHT)
- LEFT removes leading spaces only.
- RIGHT removes trailing spaces only.
Returns:
String value. The string with leading and/or trailing spaces removed.
Notes:
N/A
Example:
//create a string of spaces
$Spaces := REPSTR( “ ”, 10)
//create a string containing leading and trailing spaces
$String := $Spaces + “string” + $Spaces
%Len := LEN( $String) // 26
%Len := LEN(TRIMSTR( $String)) // 6
$Trimmed := TRIMSTR( $String, LEFT))
%Len := LEN( $Trimmed) // 16
See Also:
STR
Vue de la page 203
1 2 ... 199 200 201 202 203 204 205 206 207 208 209 ... 261 262

Commentaires sur ces manuels

Pas de commentaire