phing-system-util

# Class: StringHelper Source Location: /util/StringHelper.php
### Class Overview
String helper utility class. #### Author(s): Hans Lellelid <hans@xmpl.org> | ### Methods booleanValue endsWith hashCode isBoolean isSlotVar key multiply prefix qualifier root slotVar startsWith substring toCharArray unqualify
### Class Details [line 13] 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"). #### Tags:
author: | Hans Lellelid <hans@xmpl.org>
[ Top ] ### Class Methods ### static method booleanValue [line 115]
`static boolean booleanValue( $s)`
#### Tags:
access: | public
#### Parameters:
| $s |
[ Top ] ### static method endsWith [line 158]
`static void endsWith( $check, $string)`
tests if a string ends with a given string #### Tags:
access: | public
#### Parameters:
| $check |
| $string |
[ Top ] ### static method hashCode [line 108]
`static int hashCode( $string)`
#### Tags:
access: | public
#### Parameters:
| $string |
[ Top ] ### static method isBoolean [line 125]
`static void isBoolean( $s)`
tests if a string is a representative of a boolean #### Tags:
access: | public
#### Parameters:
| $s |
[ Top ] ### static method isSlotVar [line 191]
`static void isSlotVar( string $value)`
Does the value correspond to a slot variable? #### Tags:
access: | public
#### Parameters:
string | $value |
[ Top ] ### static method key [line 143]
`static string key( )`
Creates a key based on any number of passed params. #### Tags:
access: | public
[ Top ] ### static method multiply [line 26]
`static string multiply( $strings, $tokens, $replacements)`
Replaces identifier tokens with corresponding text values in passed string. #### Tags:
access: | public
#### Parameters:
| $strings |
| $tokens |
| $replacements |
[ Top ] ### static method prefix [line 87]
`static array prefix( array $columns, string $prefix)`
#### Tags:
return: | String[]
access: | public
#### Parameters:
array | $columns | String[]
string | $prefix |
[ Top ] ### static method qualifier [line 73]
`static string qualifier( $qualifiedName, [ $seperator = '.'])`
Get the qualifier part of a qualified name. E.g. eg.Cat -> eg #### Tags:
access: | public
#### Parameters:
| $qualifiedName |
| $seperator |
[ Top ] ### static method root [line 100]
`static string root( $qualifiedName, [ $separator = '.'])`
#### Tags:
access: | public
#### Parameters:
| $qualifiedName |
| $separator |
[ Top ] ### static method slotVar [line 202]
`static string slotVar( string $var)`
Extracts the variable name for a slot var in the format %{task.current_file} #### Tags:
return: | Extracted name part.
access: | public
#### Parameters:
string | $var | The var from build file.
[ Top ] ### static method startsWith [line 149]
`static void startsWith( $check, $string)`
tests if a string starts with a given string #### Tags:
access: | public
#### Parameters:
| $check |
| $string |
[ Top ] ### static method substring [line 170]
`static void substring( $string, $startpos, [ $endpos = -1])`
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 #### Tags:
access: | public
#### Parameters:
| $string |
| $startpos |
| $endpos |
[ Top ] ### static method toCharArray [line 59]
`static array toCharArray( $str, string $string)`
Converts a string to an indexed array of chars There's really no reason for this to be used in PHP, since strings are all accessible using the $string{0} notation. #### Tags:
deprecated: |
access: | public
#### Parameters:
string | $string |
| $str |
[ Top ] ### static method unqualify [line 41]
`static void unqualify( string $qualifiedName, [string $separator = '.'])`
Remove qualification to name. E.g. eg.Cat -> Cat #### Tags:
access: | public
#### Parameters:
string | $qualifiedName |
string | $separator | Character used to separate.
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:52:04 +0200 by phpDocumentor 1.4.3