Contact | Privacy | Datenschutzerklärung | Impressum

TuSlice

Format: TuSlice (object, start [, end])

Purpose: Make a new object that contains a field subset of an object. The object parameter must denote an object. The start and end parameters must be integers. If parameter end is not given, it defaults to the length of the object. If start or end are less than 0, they are set to 0. If start or end are greater than the length of the object, they are set to the length of the object. If start is greater than end, it is set to end.

Return Values: Returns a new object containing all fields beginning with the field with index start and ending with the field with index end-1. The field with index start in the original object becomes field with index 0 of the resulting object, aso. If start is equal to end an empty object is returned.

Example:

input:resulting output:
<? splitstring("H.E.I",".")>([0]="H", [1]="E", [2]="I")
<? TuSlice(splitstring("H.E.I","."),0)>([0]="H", [1]="E", [2]="I")
<? TuSlice(splitstring("H.E.I","."),0,len(s))>([0]="H", [1]="E", [2]="I")
<? TuSlice(splitstring("H.E.I","."),1,0)>()
<? TuSlice(splitstring("H.E.I","."),1,2)>([0]="E")

Tip: The substring() function does the same operation on strings.

See Also: TuAppField(), TuAssField(), TuAssign(), TuDelField(), TuFieldSort(), TuInsField(), TuMerge(), TuName(), TuProject(), splitstring(), 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-2024 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
Programming
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    Expressions
    Objects
    Methods
    Classes
    heitml Tags
    heitml Functions
      ArAppend
      ArConcat
      ArSearch
      array
      asc
      caltime
      chr
      class
      clone
      contains
      ContainsCase
      copy
      copyfile
      crypt
      _dbcolumns
      _dbforeignkey
      _dbprimarykey
      _dbtables
      _dbtypes
      default
      deletefile
      difftime
      directory
      findex
      flush
      fname
      gmtime
      htmlbool
      http_content_type
      http_empty_document
      http_expires
      http_header
      http_last_modified
      http_location
      http_set_cookie
      http_request_header
      _includefilepreprocessed
      index
      IndexCase
      integer
      isbool
      isdecl
      isempty
      isinteger
      isnull
      isstring
      istuple
      isreal
      left
      len
      localtime
      MD5
      mkdir
      mktime
      movefile
      offstotabcol
      random
      readFileLines
      _readini
      _readodbcdrv
      _readodbcdsn
      real
      resize
      right
      _serverdocroot
      _shelltemp
      srandom
      splitstring
      stat
      strftime
      strptime
      subst
      substall
      substring
      tabcoltooffs
      tolower
      toupper
      trim
      trimleft
      trimright
      TuAppField
      TuAssField
      TuAssign
      TuSlice
      TuDelField
      TuFieldSort
      TuInsField
      TuMerge
      TuName
      TuProject
      utime
      _writeini
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    Sessions
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  Tutorial
  New Features
  heitml 1
User Guide
Services
Privacy
Datenschutz
 
Contact / Impressum