summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorChristian Weber2012-05-15 13:25:26 +0000
committerChristian Weber2012-05-15 13:25:26 +0000
commite2974f041d43b0ce99488027dd38187d606dd552 (patch)
tree259145f26dd5735bdd5e6b2ac8f5b95a57ad9536 /it.class
parent255b45b8900fed7aab59c37b0847e5936bf62e54 (diff)
downloaditools-e2974f041d43b0ce99488027dd38187d606dd552.tar.gz
itools-e2974f041d43b0ce99488027dd38187d606dd552.tar.bz2
itools-e2974f041d43b0ce99488027dd38187d606dd552.zip
document limit option of it::replace()
Diffstat (limited to 'it.class')
-rw-r--r--it.class9
1 files changed, 6 insertions, 3 deletions
diff --git a/it.class b/it.class
index d2ac013..839e457 100644
--- a/it.class
+++ b/it.class
@@ -369,11 +369,14 @@ static function match($pattern, $string, $p = null)
return $result;
}
+
/**
* Replace parts of a string matched by a pattern with according replacement string. See convertregex for named parameters.
- * @param $replacementes Array with patterns as keys and replacement strings as values.
- * @param $string String to change.
- * @return New string.
+ * @param $replacementes Array with patterns as keys and replacement strings as values
+ * @param $string String to change
+ * @param $p['limit'] limit number of replacements (default: all)
+ * @return New string
+ * @see convertregex for more options in $p
*/
static function replace($replacements, $string, $p = array())
{