User Tools

Site Tools


crpl:docs:concat

<- CRPL reference <- String Commands

concat

ArgumentsResultNotation
Two stringsA string that is the concatenated version of the two input strings. s1 s2 – s3

Description

Takes two strings from the stack and concatenates them. The result is pushed back to the stack.

Examples

Merges “abc” and “xyz” into a single new string “abcxyz”.

ShowTraceLog
"abc" "xyz" concat Trace

Create a unit text tooltip, based on values from variables within said unit, by concatenating values and strings together.

The reason there is an endline here: “endlInterval: ” is to add a new line to the string.

once
   @awake
endonce

:awake
64 ->power
30 ->interval
42 ->cookies

"" ->tooltipText
<-tooltipText "Power: " concat <-power concat ->tooltipText
<-tooltipText "
Interval: " concat <-interval concat ->tooltipText
<-tooltipText "
Cookies: " concat <-cookies concat ->tooltipText

<-tooltipText SetPopupText
crpl/docs/concat.txt · Last modified: 2021/02/05 11:43 by Karsten75