Munger works many different ways, depending on what you specify for its arguments:
If you specify a string as the find and specify no replace string, Munger returns the position (after offset) of the first occurrence find string.
|
|
If you specify a positive integer as the length and specify no replace string, Munger returns the characters from offset to offset + length.
|
|
If you specify a string as the find and specify a replace string, Munger replaces the first occurrence after offset of text with replace.
|
|
If you specify a positive integer as the length and specify a replace string, Munger replaces the characters from offset to offset + length with replace.
|
|
If you specify a positive integer as the length, and offset + length exceeds the length of text, Munger either returns text from offset to the end or replaces that portion of text with the replace string, if it exists.
|
|
If you specify zero as the length and specify a replace string, the string is inserted before the offset position.
|
|
If you specify a negative integer as the length value and specify no replace string, Munger returns all characters from the offset to the end of the string.
|
|
If you specify a negative integer for length and specify a replace string, Munger replaces all characters from the offset to the end with the replace string.
|