aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/schema/parser/Utils.java
blob: cdb299c92df06f53f27e77d436c40fafcc6da25e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;

/**
 * @author bjorncs
 */
class Utils {

    private Utils() {}

    // Separate class since javacc does not accept Java code using lambdas
    static int count(String str, char ch) {
        return (int) str.chars().filter(c -> c == ch).count();
    }
}