Here you can find the source of length(final String s, final String separator)
public static int length(final String s, final String separator)
//package com.java2s; public class Main { public static int length(final String s, final String separator) { final String[] list = s.split(separator); return list.length; }/*w w w .j a v a 2 s.c o m*/ }