Class sandy.util.StringUtil

Method Index

getTextBetween(), replace()

Method Detail

replace

static public function replace(pstr:String, pold:String, pnew:String):String

Basic replace string method. It replace in the string pstr the pattern pold by the new pattern pnew.

Parameters

pstrThe string to modify
poldThe old pattern to replace
pnewThe new pattern you want to replace with

Return

The modified string.

getTextBetween

static public function getTextBetween(pstr:String, pdeb:String, pfin:String):Array

Returns an array containing all the strings that are between the pattern deb and end. The patterns aren't in the result strings.

Parameters

pstrString the string we are going to look for patterns into.
pdebString the start pattern
pfinString the end pattern

Return

An array of Strings if we have found some parts of string matching the pattern, or an empty array if not.