$splittok

By Sight on Nov 01, 2007

; $splittok - Sight
; ;; What this is ;;
; $splittok returns tokens of your choice after a point in a string
; ;; Syntax ;;
; $splittok(string,,C).N2
; ;; Examples ;;
; $splittok(Sight of the eye,of,32).1 would return 'the'
; $splittok(Sight of the eye,of,32).1- would return 'the eye'
; However: $splittok(Sight of the eye,of,32).0 would return $false

; $splittok - Sight
; ;; What this is ;;
; $splittok returns token of your choice after a point in a string
; ;; Syntax ;; 
; $splittok(string,<N>,C).N2 
; ;; Examples ;;
; $splittok(Sight of the eye,of,32).1 would return 'the' 
; $splittok(Sight of the eye,of,32).1- would return 'the eye'
; However: $splittok(Sight of the eye,of,32).0 would return $false

alias splittok { if ($$1 && $2-3 && $prop) { return $iif($prop = 0 || !$gettok($$1,$2,$3),$false,$gettok($gettok($$1,$+($calc($findtok($$1,$2,1,$3) + 1),-),$3),$prop,$3))) } }

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.