Class OpenText

java.lang.Object
cloud.opencode.base.string.text.OpenText

public final class OpenText extends Object
Text Utility - Provides general text manipulation methods. 文本工具 - 提供通用文本操作方法。

Features | 主要功能:

  • Text truncation (head, middle, byte-based) - 文本截断(头部、中间、字节)
  • Text highlighting (HTML, console) - 文本高亮(HTML、控制台)
  • Text wrapping and indentation - 文本换行和缩进

Usage Examples | 使用示例:

String truncated = OpenText.truncate("Hello World", 8); // "Hello..."
String wrapped = OpenText.wrap("long text here", 10);
String indented = OpenText.indent("line1\nline2", 4);

Security | 安全性:

  • Thread-safe: Yes (stateless facade) - 线程安全: 是(无状态门面)
  • Null-safe: Yes - 空值安全: 是
Since:
JDK 25, opencode-base-string V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also: