utilities.java
来自「Groovy动态语言 运行在JVM中的动态语言 可以方便的处理业务逻辑变化大的业」· Java 代码 · 共 37 行
JAVA
37 行
package org.codehaus.groovy.tools;
/**
* Various utility functions for use in the compiler.
*/
public abstract class Utilities
{
/**
* Returns a string made up of repetitions of the specified string.
*/
public static String repeatString( String pattern, int repeats )
{
StringBuffer buffer = new StringBuffer( pattern.length() * repeats );
for( int i = 0; i < repeats; i++ )
{
buffer.append( pattern );
}
return new String( buffer );
}
/**
* Returns the end-of-line marker.
*/
public static String eol()
{
return eol;
}
private static String eol = System.getProperty( "line.separator", "\n" );
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?