pfe-string-ext
Prev? | pfe Forth Wordset List | ?Next

## Name

pfe-string-ext ? String + extensions

## Synopsis

`-TRAILING ( str-ptr str-len -- str-ptr str-len' ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

`/STRING ( str-ptr str-len n -- str-ptr' str-len' ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

`BLANK ( str-ptr str-len -- ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

`CMOVE ( from-ptr to-ptr len# -- ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

`CMOVE> ( from-ptr to-ptr len# -- ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

`COMPARE ( str1-ptr str1-len str2-ptr str2-len -- diff# ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

`SEARCH ( str1-ptr str1-len str2-ptr str2-len -- str1-ptr' str1-len' flag ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

`SLITERAL ( C: str-ptr str-len -- S: str-ptr str-len ) ?=>? (` | `)`; | ?

`"[ANS] FORTH"`;
?

## Description

-TRAILING ( str-ptr str-len -- str-ptr str-len' ) => "[ANS] FORTH"

check the given buffer if it contains whitespace at its end. If so, shorten str-len to meet the last non-whitespace character in the buffer.

/STRING ( str-ptr str-len n -- str-ptr' str-len' ) => "[ANS] FORTH"

shorten the buffer from the beginning by n characters, i.e.

       str-ptr += n ;
       str-len -= n;

BLANK ( str-ptr str-len -- ) => "[ANS] FORTH"

`FILL` a given buffer with `BL` blanks

CMOVE ( from-ptr to-ptr len# -- ) => "[ANS] FORTH"

memcpy an area from->to for len bytes, starting at the lower addresses, see `CMOVE>`

CMOVE> ( from-ptr to-ptr len# -- ) => "[ANS] FORTH"

memcpy an area from->to for len bytes, starting with the higher addresses, see `CMOVE`

COMPARE ( str1-ptr str1-len str2-ptr str2-len -- diff# ) => "[ANS] FORTH"

compare both str-buffers, return 0 if they are equal, -1 if lower or shorter, and 1 if greater or longer

SEARCH ( str1-ptr str1-len str2-ptr str2-len -- str1-ptr' str1-len' flag ) => "[ANS] FORTH"

search the str-buffer1 for the text of str-buffer2, if it is contained return TRUE and return buffer-values that point to the contained string, otherwise return FALSE and leave the original str-buffer1.

SLITERAL ( C: str-ptr str-len -- S: str-ptr str-len ) => "[ANS] FORTH"

this word does almost the same as `LITERAL` - it takes an `S"` string as specified in the CS-STACK at compile time and compiles into the current definition where it is returned as if there were a direct string-literal. This can be used to compute a string-literal at compile-time and hardwire it.

      example:
        : ORIGINAL-HOME  [ $HOME COUNT ] SLITERAL ; ( -- str-ptr str-len )

Prev? | Up | ?Next
pfe-stackhelp-ext? | Home | ?pfe-struct-ext