Teil einer Zeichenkette zurückliefern

PUB substr (strAddr, start, count) | i
{{ returns part of a string for count bytes starting from start byte. }}
  bytefill(@ostr, 0, STR_MAX_LENGTH)
  i~
  IF (count < 0)                                               ' if value is negative, go to the end of the string
    count := STR_MAX_LENGTH - start

  bytemove(@ostr, strAddr + start, count)                      ' just move the selected section
  return @ostr
schnipsel/string3.txt · Zuletzt geändert: 04.08.2009 17:47 (Externe Bearbeitung)
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: GNU Free Documentation License 1.3
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki