MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / fix

Method fix

chapter19/src/main/java/com/seaofnodes/simple/SB.java:42–47  ·  view source on GitHub ↗
( int sz, String s )

Source from the content-addressed store, hash-verified

40 }
41 // Fixed width field
42 public SB fix( int sz, String s ) {
43 assert sz >=0;
44 for( int i=0; i<sz; i++ )
45 _sb.append( i < s.length() ? s.charAt(i) : ' ');
46 return this;
47 }
48
49 // Not spelled "p" on purpose: too easy to accidentally say "p(1.0)" and
50 // suddenly call the autoboxed version.

Callers 1

doInstMethod · 0.45

Calls 1

lengthMethod · 0.45

Tested by

no test coverage detected