| |
left, right
Format:
left ( string, position ) |
Format:
right ( string, position ) |
Purpose:
Computes a substring starting at the first (ending in the last)
position of a string.
The string parameter must be a string.
The position parameter can be a string or an integer.
Return Values:
If position is an integer number n, then left() (right())
returns the left most (right most) n characters of string.
If the position parameter is a string, then left()
(right()) looks whether the position string is a substring in
string. If found it returns the left most (right most) characters in string that are in
front of (follow) the position string. If not found, then the whole string is returned.
Example:
input: | resulting output:
|
<? left ("Hello World", 5)> | Hello |
<? left ("Hello World", "World")> | Hello |
<? left ("Hello World", "X")> | Hello World |
<? right ("Hello World", 5)> | World |
<? right ("Hello World", "Hello")> | World |
<? right ("Hello World", "X")> | Hello World |
See Also:
substring().
This page was dynamically generated by the
web application development tool RADpage
of H.E.I.
H.E.I. provides support, tools, and services like
Webdesign in Mannheimm,
the HTML/CSS 3D WebGL Animation Library taccgl,
3D Webdesign, and
3D Product ConfiguratorDemo
(3D Produkt Konfigurator Demo in German).
© 1996-2025 H.E.I. All Rights Reserved.
|