public static long longHashCode(String string) {
    long h = 1125899906842597L;
    int len = string.length();

    for (int i = 0; i < len; i++) {
      h = 31 * h + string.charAt(i);
    }
    return h;
  }
Returns the number of whitespace characters at the end of the given line.

@param line
@return
spock-core/src/main/java/org/spockframework/util/TextUtil.java