Returns a specific token from a delimited string list.

Category:
String Manipulation
Type:
Snippets
Difficulty:
Beginning
Author:
Troy DeMonbreun

Version Compatibility:

More information:
Returns : [string] "Token" (section of data) from a list of delimited string data

Requires : [string] delimited data, [integer] index of desired section, [string] delimiter (1 or more chars)

Examples : GetToken("steve@hotmail.com", 2, "@") returns "hotmail.com"
GetToken("123-45-6789", 2, "-") returns "45"
GetToken("first,middle,last", 3, ",") returns "last"

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: