DELCHAR/de
(Difference between revisions)
m (1 revision) |
(→(**COPIED FROM ENGLISH PAGE**) =) |
||
Line 1: | Line 1: | ||
− | + | = <span class="f_Header">Funktion</span> = | |
− | + | Löscht ein Zeichen aus einer Zeichenkette. | |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> |
Revision as of 01:42, 21 February 2013
Contents |
Funktion
Löscht ein Zeichen aus einer Zeichenkette.
Syntax
DELCHAR string, pos
Remarks
string |
The string where the character is removed from. |
pos |
The position where the character must be removed from. A value of 1 would remove the first character. |
Do not confuse with the DELCHARS statement which removes all characters based on a character value.
The DELCHAR removes one character from a string based on an index.
See also
DELCHARS , INSERTCHAR , INSTR , MID , CHARPOS , REPLACECHARS
Example
'---------------------------------------------------------------- ' (c) 1995-2011, MCS ' del_insert_chars.bas ' This sample demonstrates the delchar, delchars and insertchar statements '----------------------------------------------------------------- $regfile="m88def.dat" $crystal = 8000000 $hwstack = 40 $swstack = 40 $framesize = 40 dim s as string * 30 s = "This is a test string" ' create a string delchar s, 1 ' remove the first char print s ' print it insertchar s,1, "t" ' put a small t back print s delchars s,"s" ' remove all s print s end
Languages | English • Deutsch |
---|