Contact | Privacy | Datenschutzerklärung | Impressum


Format: substring ( string, start [ , end ] )

Purpose: Get a substring of a string. The parameter string must be a string, parameters start and end must be integers. If parameter end is not given, it defaults to the length of the string. If start or end are less than 0, they are set to 0. If start or end are greater than the length of the string, they are set to the length of the string. If start is greater than end, it is set to end.

Return Values: Returns a substring of string starting at position start and ending at position end -1. Positions are counted from left to right starting with 0. If start is equal to end an empty string is returned.


input:resulting output:
<? substring ("Hello World",4)>o World
<? substring ("Hello World",4,8)>o Wo
<? substring ("Hello World",4,2)>

Tip: The TuSlice() function does the same operation on objects.

See Also: TuSlice(), subst().

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-2024 H.E.I. All Rights Reserved.

Component Guide
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    heitml Tags
    heitml Functions
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  New Features
  heitml 1
User Guide
Contact / Impressum