Loading...
Loading...
Insert, delete, replace, extract, locate or measure at exact character offsets, counting by grapheme, code point or UTF-16 unit, with the affected range reported in both the chosen unit and UTF-16. Called as POST /v1/text/char-edit, it takes text, op, unit, index and returns op, unit, text, inputLength. Character-indexed string edits are a measured failure mode for language models (arXiv:2409.15452), and the index a model reasons about is rarely the index a runtime uses: a skin-toned emoji is one grapheme, two code points and four UTF-16 units, so an offset is wrong until the unit is named. Reading this schema and dry-running the call are free and need no wallet; a real call costs $0.003, paid in USDC on Base over x402.
npx skill4agent add fittings-sh/fittings fittings-text-char-edittext.char-edithttps://fittings.shPOST https://fittings.sh/v1/text/char-edit| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | Text to operate on, 20000 UTF-16 units or fewer |
| string | yes | insert | delete | replace | extract | find | measure |
| string | no | grapheme | codepoint (default) | utf16 |
| number | no | insert: offset to insert before |
| number | no | delete, replace, extract: first offset in the range |
| number | no | delete, replace, extract: offset just past the range |
| string | no | insert, replace: text to put in, 5000 UTF-16 units or fewer |
| string | no | find: substring to locate |
| number | no | find: offset to start searching at, default 0 |
{
"text": "The quick brown fox",
"op": "replace",
"unit": "codepoint",
"start": 4,
"end": 9,
"value": "slow"
}| Price | $0.003 per call, metered per characters |
| Source | none (pure compute) |
| Licence | none-needed |
fittingscall.mjscurl -sO https://fittings.sh/skill/call.mjscurl -s https://fittings.sh/catalog/text.char-edit | jq402 Payment Required# Dry run. Prints the quote and pays nothing, because no key is set.
node call.mjs text.char-edit text="The quick brown fox" op=replace unit=codepoint start=4 end=9 value=slow
# For real: a wallet holding USDC on Base, and nothing else.
export FITTINGS_PRIVATE_KEY=0x...
node call.mjs text.char-edit text="The quick brown fox" op=replace unit=codepoint start=4 end=9 value=slowFITTINGS_PRIVATE_KEYFITTINGS_MAX_PRICE@x402/core@x402/evmfittingshttps://fittings.sh/catalog/search?q=...