Home > Contents > Index >
Expanded TOC   |    Accordion TOC   |    Annotated TOC   |    Index

 

Utilities.words

Parses a string into a vector of words. The separator specifies the character that serves as the delimiter between words. White space is removed from both ends of each word parsed, using String.trim().

This method has two variants:


Utilities.words

Parses a string into a vector of words.

Syntax

Parameters

str
String of words to parse.

sep
The separator character.

Description

The words method parses a string into a vector of words. The separator specifies the character that serves as the delimiter between words. White space is removed from both ends of each word parsed, using String.trim().

Returns

Returns a vector of words (may be empty).


Utilities.words

Parses a string into a vector of words.

Syntax

Parameters

str
String of words to parse.

sep
String of separating characters.

Description

The words method parses a string into a vector of words. The separator specifies the string of characters that serves as the delimiter between words. Whitespace is removed from both ends of each word parsed, using String.trim().

Returns

Returns a vector of words (may be empty).

Examples

The following code returns a vector containing the three strings "Jack", "Jill", "Little Alice".

The following code returns an empty vector, not a vector containing two empty strings:

 

  Home > Contents > Index >

FatWire JAVA Reference
Copyright 2005 by FatWire Software
All rights reserved.