ASN1C C# Runtime Library  7.8
Public Member Functions | Properties | List of all members
Tokenizer Class Reference

Inherits IEnumerator.

Public Member Functions

bool HasMoreTokens ()
 
bool MoveNext ()
 
System.String NextToken ()
 
System.String NextToken (System.String delimiters)
 
string RemainingString ()
 
void Reset ()
 
 Tokenizer (System.String source)
 
 Tokenizer (System.String source, System.String delimiters)
 
 Tokenizer (System.String source, System.String delimiters, bool includeDelims)
 

Properties

int Count [get]
 
System.Object Current [get]
 

Detailed Description

The class performs token processing in strings

Constructor & Destructor Documentation

◆ Tokenizer() [1/3]

Tokenizer ( System.String  source)

Initializes a new class instance with a specified string to process

Parameters
sourceString to tokenize

◆ Tokenizer() [2/3]

Tokenizer ( System.String  source,
System.String  delimiters 
)

Initializes a new class instance with a specified string to process and the specified token delimiters to use

Parameters
sourceString to tokenize
delimitersString containing the delimiters

◆ Tokenizer() [3/3]

Tokenizer ( System.String  source,
System.String  delimiters,
bool  includeDelims 
)

Initializes a new class instance with a specified string to process, the specified token delimiters to use, and whether the delimiters must be included in the results.

Parameters
sourceString to tokenize
delimitersString containing the delimiters
includeDelimsDetermines if delimiters are included in the results.

Member Function Documentation

◆ HasMoreTokens()

bool HasMoreTokens ( )

Determines if there are more tokens to return from the source string

Returns
True or false, depending if there are more tokens

Referenced by Asn1Util.GetAddressBytes().

◆ MoveNext()

bool MoveNext ( )

Performs the same action as HasMoreTokens.

Returns
True or false, depending if there are more tokens

◆ NextToken() [1/2]

System.String NextToken ( )

Returns the next token from the token list

Returns
The string value of the token

Referenced by Asn1Util.GetAddressBytes().

◆ NextToken() [2/2]

System.String NextToken ( System.String  delimiters)

Returns the next token from the source string, using the provided token delimiters

Parameters
delimitersString containing the delimiters to use
Returns
The string value of the token

◆ RemainingString()

string RemainingString ( )

Returns the rest of the string from current position.

Returns
rest of the string

◆ Reset()

void Reset ( )

Does nothing.

Property Documentation

◆ Count

int Count
get

Remaining tokens count

◆ Current

System.Object Current
get

Performs the same action as NextToken.