Click or drag to resize

StringTokenizer Class

Implements a StringTools.StringTokenizer class for splitting a string into substrings using a set of delimiters.
Inheritance Hierarchy
SystemObject
  NetQuarryStringTokenizer

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public class StringTokenizer : IEnumerable<string>, 
	IEnumerable

The StringTokenizer type exposes the following members.

Constructors
  NameDescription
Public methodStringTokenizer(String)
Constructs a string tokenizer for the specified string using the default delimiters.
Public methodStringTokenizer(String, Char)
Constructs a string tokenizer for the specified string using the given delimiters.
Public methodStringTokenizer(String, String)
Constructs a string tokenizer for the specified string using the given delimiters.
Public methodStringTokenizer(String, String, Boolean)
Constructs a string tokenizer for the specified string using the given delimiters and optionally returning them as tokens.
Public methodStringTokenizer(String, String, Boolean, Boolean)
Constructs a string tokenizer for the specified string using the given delimiters, optionally returning them as tokens. Also empty tokens may be returned using the String.Empty string.
Public methodStringTokenizer(String, String, Boolean, Boolean, String)
Constructs a string tokenizer for the specified string using the given delimiters, optionally returning them as tokens. Also empty tokens may be returned using the empty string.
Top
Properties
  NameDescription
Public propertyCount
Gets the total number of tokens extracted.
Public propertyCountTokens
Counts the remaining tokens - the number of times the NextToken property can be used before it throws an exception.
Public propertyEmptyString
Gets the currently set string for empty tokens.
Public propertyHasMoreTokens
Tests if there are more tokens available from this tokenizer's string. If this method returns true, then a subsequent use of the NextToken property will successfully return a token.
Public propertyItem
Gets the token with the specified index from the tokenizer without moving the current position index.
Public propertyNextToken
Gets the next token.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReset
Resets the current position index so that the tokens can be extracted again.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberDefaultDelimiters
String conatining the default set of delimiters which are " \t\n\r\f": the space character, the tab character, the newline character, the carriage-return character, and the form-feed character.
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
Remarks
C# version of the java.util.StringTokenizer class. Basicly it's a wrapper class around the String.Split method. It implements all of it's Java equivalent methods apart from those only needed by the Enumeration interface. All implemented Java-compilant methods have their C# equivalents in properties. They however differ in names since Java uses the (Hungarian-like) notation runMe() while C# uses Camel-cased RunMe() and thus Java's nextToken() method is just an alias of the NextToken property.
See Also