private String apply(String name, Rule rule, Case $case) throws CantApplyRuleException, UnknownCaseException {
        StringBuilder result = new StringBuilder(name.length() + 5).append(name);

        CharacterIterator itr = new StringCharacterIterator(
            modificatorFor($case, rule)
        );
        char $char = itr.current();
        while ($char != CharacterIterator.DONE) {
            switch ($char) {
                case '.' :
                    break;
                case '-' :
                    if (result.length() == 0) {
                        throw new CantApplyRuleException(
                            format("Can't apply rule for '%s' case %s", name, $case)
                        );
                    }
                    result.setLength(result.length() - 1);
                    break;
                default:
                    result.append($char);
            }
            $char = itr.next();
        }

        return result.toString();
    }