Docs - escape
06/06/2010: SUIT 2.0.0 and Rulebox 1.0.0 released.
Available Since: SUIT (2.0.0)
Handle escape strings for this position.
| Key | Description |
|---|---|
| odd | bool: Whether or not the count of the escape strings to the left of this position is odd, escaping the open or close string. |
| position | int: The position adjusted to the change in the string. |
| string | str: The string omitting the necessary escape strings. |
<?php
require 'suit.class.php';
$suit = new SUIT();
$result = $suit->escape('\\', 1, '\[var]');
/*
Result: array
(
'position' => 0,
'odd' => 1,
'string' => '[var]'
)
*/
?>
import suit
result = suit.escape('\\', 1, '\\[var]')
# Result: {
# 'position': 0,
# 'odd': 1,
# 'string': '[var]'
# }






