Project

General

Profile

Actions

Added in 1.9.0

$deltok(text,N-N2,C)

Deletes the Nth token from text.

N-N2 can be used to get a range of tokens, both numbers can be negative.
N- can be used to get all tokens from position N.

Parameters

Parameter Description
text The text to tokenize.
N N2 - The range of tokens or Nth token to delete.
C The ASCII value to tokenize by.

Example

; Delete the 3rd token, result is 'a.b.d'
//echo -ag $deltok(a.b.c.d,3,46)

; Delete the second to third token, result is 'a.d'
//echo -ag $deltok(a.b.c.d,2-3,46)

; Delete all tokens from the second to end.
//echo -ag $deltok(a.b.c.d,2-,46)

Updated by Per Amundsen almost 2 years ago · 3 revisions

Also available in: PDF HTML TXT