Project

General

Profile

Actions

Returnex » History » Revision 1

Revision 1/4 | Next »
Per Amundsen, 02/14/2014 03:19 AM


Added in 1.9.0

/returnex [text]

Halts a currently executing script and allows the calling routine to continue processing.

Same as /return but retains all spaces, including leading, trailing, and multiple.

Parameters

[text] - Text to return.

Example

alias example {
  ;Prints 9: <space>A<space><space>B<space><space>C<space>.
  echo -a $len($preserve_space)

  ;Prints 5: A<space>B<space>C.
  echo -a $len($strip_space)
}

;Return with the spaces intact.
alias preserve_space returnex $get_abc

;Collaps spaces.
alias strip_space return $get_abc

;Just an example string "<space>A<space><space>B<space><space>C<space>".
alias get_abc returnex $+($chr(32), A, $chr(32), $chr(32), B, $chr(32), $chr(32), C, $chr(32))

Updated by Per Amundsen almost 11 years ago · 1 revisions

Also available in: PDF HTML TXT