Please don't use boolean parameters; they make code difficult to understand. It would probably be best to move `rightSide` and `zeroChar` into an optional `options` object parameter.