This is part of the HicEst documentation

Strings in HicEst


String operations like definition, assign, swap, indexing, substring, space controlled join, conversion, searching, editing, inline-loop, query.

⇒Home ⇒Contents ⇒more Strings
use for examples
CHARACTER declaration
  • CHARACTER S*10, T="len4", U*20/"initialization"/
ALIAS named substrings
ALIAS(T,3, tt,2) tt == T(3:4) == "n4"
= set a string
S = "some text" some text
() single character index
S = T(2) e
>< SWAP (sub-)strings
S >< U values exchanged
: FromTo
S = S(10:1) txet emos 
// join untrimmed
S = "A  " // "BC" A  BC
& Join trimmed
S = "A  " & "BC" ABC
&& join, 1 space
S = "A  " && "BC" A BC
&&& join, 2 spaces (etc)
S = "A  " &&& "BC" A  BC
$ linear index of left-hand side string
S = T(5- $) 4nel
$1 inlineLoop index
S = &("+-") +-+-+-+-+-
CHAR number to character
CHAR(65) "A"
ICHAR character to number
ICHAR("A") 65
INDEX find, scan, verify, count, regex
i = INDEX(T, "n4") 3
EDIT useful operations, from basic to complex, like insert, lexicon, sort, inverted index
EDIT(Text=U, Right="i", RePLace=".", DO) .n.t.al.zat.on
InlineLoop indexed string loop
maximum = MAX( A( $1, $1) ) 9
LEN length
LEN(S) 10
LEN_TRIM trimmed length
S = "abc"
L = LEN_TRIM(S)
abc
3
TRIM trimmed string
WRITE(...) TRIM(S) discard trailing spaces



Support HicEst   ⇒ Impressum
©2000-2016 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.