⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringutility.java

📁 用Swing实现的CHM制作工具
💻 JAVA
字号:
package g2w.app.gchm.lib;

import java.util.Date;


/**
 * A utility class to handle string.
 * 
 * @author GreatGhoul
 * @version 001 2009-3-21 17:44:59
 */
public class StringUtility {
	/**
	 * Return a string that is length times of cell.
	 * 
	 * @param cell The cell string.
	 * @param length The length.
	 * @return The length times' string 
	 */
	public static String buildString(String cell, int length) {
		StringBuilder ret = new StringBuilder(length);
		ret.setLength(length);
		ret.setCharAt(length - 1, ' ');
		return ret.toString().replaceAll(".", cell);
	}
	
	public static void main(String[] args) {
		System.out.println(StringUtility.buildString("[]", 10000));
	}

	public static String quote(String text, String quote) {
		return quote + text + quote;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -