com.yahoo.schema.parser.Utils Maven / Gradle / Ivy
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.schema.parser;
/**
* @author bjorncs
*/
public class Utils {
private Utils() {}
// Separate class since javacc does not accept Java code using lambdas
public static int count(String str, char ch) {
return (int) str.chars().filter(c -> c == ch).count();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy