StringHelper

String helper utility class.

This class includes some Java-like functions for parsing strings, as well as some functions for getting qualifiers / unqualifying phing-style classpaths. (e.g. "phing.util.StringHelper").

author

Hans Lellelid [email protected]

package

phing.system.util

Methods

booleanValue

booleanValue(boolean|string $s) : boolean
static

Arguments

$s

boolean|string

Response

boolean

tests if a string ends with a given string

endsWith( $check,  $string) : boolean
static

Arguments

$check

$string

Response

boolean

hashCode

hashCode( $string) : integer
static

Arguments

$string

Response

integer

tests if a string is a representative of a boolean

isBoolean(boolean|string $s) : boolean
static

Arguments

$s

boolean|string

Response

boolean

Does the value correspond to a slot variable?

isSlotVar(string $value) : boolean|integer
static

Arguments

$value

string

Response

boolean|integer

Creates a key based on any number of passed params.

key() : string
static

Response

string

prefix

prefix(array $columns, string $prefix) : array
static

Arguments

$columns

array

String[]

$prefix

string

Response

array

String[]

root

root( $qualifiedName, string $separator = '.') : string
static

Arguments

$qualifiedName

$separator

string

Response

string

Extracts the variable name for a slot var in the format %{task.current_file}

slotVar(string $var) : string
static

Arguments

$var

string

The var from build file.

Response

string

Extracted name part.

tests if a string starts with a given string

startsWith( $check,  $string) : boolean
static

Arguments

$check

$string

Response

boolean

a natural way of getting a subtring, php's circular string buffer and strange return values suck if you want to program strict as of C or friends

substring(string $string, integer $startpos, integer $endpos = -1) : string
static

Arguments

$string

string

$startpos

integer

$endpos

integer

Response

string

Remove qualification to name.

unqualify(string $qualifiedName, string $separator = '.') : string
static

E.g. eg.Cat -> Cat

Arguments

$qualifiedName

string

$separator

string

Character used to separate.

Response

string

Properties

TRUE_VALUES

TRUE_VALUES : array
static
var

Type(s)

array

FALSE_VALUES

FALSE_VALUES : array
static
var

Type(s)

array