@Test @DisplayName("Test that space() returns only spaces and as many as requested") void testSpaces(){ for( int i = 0 ; i < 200 ; i ++ ){ final var result = JVM8Tools.space(i); Assertions.assertEquals(i,result.length()); for( int j = 0 ; j < result.length() ; j++ ) { Assertions.assertEquals(' ',result.charAt(j)); } } }
public static String space(int n){ final StringBuilder sb = new StringBuilder(" "); while( sb.length() < n){ sb.append(sb); } return sb.substring(0,n); }
JVM8Tools { public static String space(int n){ final StringBuilder sb = new StringBuilder(" "); while( sb.length() < n){ sb.append(sb); } return sb.substring(0,n); } }
JVM8Tools { public static String space(int n){ final StringBuilder sb = new StringBuilder(" "); while( sb.length() < n){ sb.append(sb); } return sb.substring(0,n); }  }
JVM8Tools { public static String space(int n){ final StringBuilder sb = new StringBuilder(" "); while( sb.length() < n){ sb.append(sb); } return sb.substring(0,n); }  static String space(int n); static String string(char c ,int n); static Class<?> getNestHost(Class<?> klass); static Map<K,V> asMap(Object ... objects); static String getPackageName(Class<?> klass); static String stripLeading(final String s); static String stripTrailing(final String s); static byte[] readAllBytes(final InputStream is); static byte[] readNBytes(final InputStream is, final int len); }
JVM8Tools { public static String space(int n){ final StringBuilder sb = new StringBuilder(" "); while( sb.length() < n){ sb.append(sb); } return sb.substring(0,n); }  static String space(int n); static String string(char c ,int n); static Class<?> getNestHost(Class<?> klass); static Map<K,V> asMap(Object ... objects); static String getPackageName(Class<?> klass); static String stripLeading(final String s); static String stripTrailing(final String s); static byte[] readAllBytes(final InputStream is); static byte[] readNBytes(final InputStream is, final int len);  }