User Tools

Site Tools


pf:prpldocs:strings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pf:prpldocs:strings [2016/06/24 22:00] – Added known string commands. planetfallpf:prpldocs:strings [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 20: Line 20:
 </html> </html>
 <code> <code>
- 
 =CMD =CMD
 =COMMAND Concat (string string) string =COMMAND Concat (string string) string
Line 49: Line 48:
 Takes two strings from the stack and returns whether the first string starts with the second (case sensitive) Takes two strings from the stack and returns whether the first string starts with the second (case sensitive)
 =ENDDESC =ENDDESC
 +=EX
 if (StartsWith("Hello there" "Hello")) if (StartsWith("Hello there" "Hello"))
     Trace("I opened with hello")     Trace("I opened with hello")
Line 60: Line 60:
 Takes two strings from the stack and returns whether the first string ends with the second (case sensitive) Takes two strings from the stack and returns whether the first string ends with the second (case sensitive)
 =ENDDESC =ENDDESC
 +=EX
 if (EndsWith("Hello there" "there")) if (EndsWith("Hello there" "there"))
     Trace("I went there")     Trace("I went there")
Line 74: Line 75:
 Split("Here is a sentence with some words in." " ") ->wordsList Split("Here is a sentence with some words in." " ") ->wordsList
 <-wordsList GetListCount 0 do <-wordsList GetListCount 0 do
 + Trace(<-wordsList[I])
 +loop
 +=ENDEX
 +=ENDCMD
 +
 +=CMD
 +=COMMAND StringToList (string) list
 +=DESC
 +Takes a string from the stack and returns the list of characters in the string.
 +=ENDDESC
 +=EX
 +StringToList("Hello human") ->charactersList
 +<-charactersList GetListCount 0 do
  Trace(<-wordsList[I])  Trace(<-wordsList[I])
 loop loop
pf/prpldocs/strings.1466805647.txt.gz · Last modified: 2025/02/14 14:56 (external edit)