class ShardingUtil {

    static void removeIfTailHasString(StringBuilder original, String targetStr) {
        int whiteFieldsLength = original.length();
        if (whiteFieldsLength > 0 && original.lastIndexOf(targetStr) == whiteFieldsLength - 1) {
            original.deleteCharAt(whiteFieldsLength - 1);
        }
    }

}