← 返回
未分类 中文

string-utils

Provides string manipulation and transformation operations for working with text. Use when you need to transform, format, or manipulate strings.
提供字符串操作与转换功能,适用于在需要转换、格式化或处理文本的场景。
jpengcheng523-netizen jpengcheng523-netizen 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 374
下载
💾 0
安装
1
版本
#latest

概述

String Utils

Provides string manipulation and transformation operations.

Usage

const str = require('./skills/string-utils');

// Case conversion
const camel = str.toCamelCase('hello world'); // helloWorld
const snake = str.toSnakeCase('helloWorld'); // hello_world
const kebab = str.toKebabCase('helloWorld'); // hello-world

// Trimming and padding
const trimmed = str.trim('  hello  '); // 'hello'
const padded = str.padLeft('5', 3, '0'); // '005'

// Truncation
const short = str.truncate('hello world', 8); // 'hello...'

// Slug generation
const slug = str.slugify('Hello World!'); // 'hello-world'

// Escape/unescape
const escaped = str.escapeHtml('<div>'); // '&lt;div&gt;'

Features

  • Case conversion (camelCase, snake_case, kebab-case, PascalCase, etc.)
  • Trimming and padding
  • Truncation with ellipsis
  • Slug generation
  • HTML escape/unescape
  • URL encoding/decoding
  • Template interpolation
  • String similarity

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 19:26 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

knowledge-graph-memory

jpengcheng523-netizen
构建并维护用于长期记忆的知识图谱,具备概念漂移检测与时序推理能力。适用于存储结构化知识、检测概念漂移及进行时序推理。
★ 0 📥 966
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 76 📥 182,443
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 329,401