Zeichenkette in Großbuchstaben umwandeln

PUB strtoupper (strAddr) | i
{{ sets all characters in string to uppercase. }}
  bytefill(@ostr, 0, STR_MAX_LENGTH)    
                             
  REPEAT i FROM 0 TO strsize(strAddr)
    IF (byte[strAddr + i] => 97 AND byte[strAddr + i] =< 122)  ' if byte is in the lowercase range, subtract 32 from byte
      ostr[i] += byte[strAddr + i] - 32
    ELSE                                     
      ostr[i] += byte[strAddr + i]
                                  
  return @ostr
schnipsel/string2.txt · Zuletzt geändert: 04.08.2009 17:46 (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