cdl-string(3)

NAME
cdl-string - CDL3 runtime system, string handling.

SYNOPSYS
FUNCTION length (>TEXT,INT>),
FUNCTION extract (>TEXT,>INT1,>INT2,TEXT1>),
TEST is subtext (>TEXT,>INT>,>TEXT1),
TEST between (>TEXT,>INT,>TEXT1,>TEXT2),
TEST not between (>TEXT,>INT,>TEXT1,>TEXT2),
TEST before (>TEXT,>TEXT1),
TEST is prefix (>TEXT,>TEXT1,TEXT2>),
TEST prefix (>TEXT,>INT,TEXT1>,TEXT2>)

DESCRIPTION

  FUNCTION length (>TEXT,INT>),
Returns the length of TEXT into INT.

  FUNCTION extract (>TEXT,>INT1,>INT2,TEXT1>),
Returns the substring from TEXT indexed from INT1 upto INT2 into TEXT2.

  TEST is subtext (>TEXT,>INT>,>TEXT1)
Succeeds if the subtext in TEXT at index INT compares to TEXT1.

  TEST between (>TEXT,>INT,>TEXT1,>TEXT2)
Succeeds if the ascii value of the character at index INT in TEXT is greater than or equal to the ascii value of TEXT1 and less than or equal to the ascii value of TEXT2.

  TEST not between (>TEXT,>INT,>TEXT1,>TEXT2)
Succeed if the ascii value of the character at index INT in TEXT is less than the ascii value of TEXT1 or greater than the ascii value of TEXT2.

  TEST before (>TEXT,>TEXT1)
Succeeds if TEXT precedes TEXT2 according to the usual lexicographic order. This call uses strcmp(3).

  TEST is prefix (>TEXT,>TEXT1,TEXT2>)
If TEXT1 is prefixed with TEXT then put the tail into TEXT2. This call uses strncmp(3).

  TEST prefix (>TEXT,>INT,TEXT1>,TEXT2>)
Split the TEXT at index INT and put the first part into TEXT1 and the last part into TEXT2.

FILES
All run time system calls are defined in predef.k3 which was configured to be installed in /usr/pkg/share/cdl3/include in your installation.

SEE ALSO
cdlc(1), cdlrts(3) cdl-io(3), cdl-output(3), cdl-debug(3), cdl-input(3), cdl-integer(3), cdl-converting(3), cdl-system(3)

COPYING
Copyright (C) 2000 C.H.A. Koster
CDL3 is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
CDL3 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this version of CDL; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA