diff options
author | Christian Weber | 2012-05-15 13:25:26 +0000 |
---|---|---|
committer | Christian Weber | 2012-05-15 13:25:26 +0000 |
commit | e2974f041d43b0ce99488027dd38187d606dd552 (patch) | |
tree | 259145f26dd5735bdd5e6b2ac8f5b95a57ad9536 | |
parent | 255b45b8900fed7aab59c37b0847e5936bf62e54 (diff) | |
download | itools-e2974f041d43b0ce99488027dd38187d606dd552.tar.gz itools-e2974f041d43b0ce99488027dd38187d606dd552.tar.bz2 itools-e2974f041d43b0ce99488027dd38187d606dd552.zip |
document limit option of it::replace()
-rw-r--r-- | it.class | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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()) { |