CLAUDE WATERMARK REMOVER · PRACTICAL TEST
Does startsWith still use the old position after deleting a leading character?
No. In our leading U+200B fixture, startsWith("AB", 1) changes from true to false after deletion, while the default startsWith changes from false to true. includes remains true. Recalculate positions for the final string.
Open the Claude text cleaner · Full measured data
Measured inputs and outputs
These are locally constructed test strings, not evidence that Claude inserts these characters. We executed the saved homepage script snapshot with a minimal DOM harness and compared exact strings. The invisible-checkbox state and dash mode appear in each row. The observations below test this page's specific question. Destination observations run independently on the exact input and cleaned strings in the recorded Node runtime. We make no detector-score or statistical-watermark removal claim.
| Fixture and mode | Input string and code points | Output and cleaner status | Observed before / after |
|---|---|---|---|
| Leading marker direct string / keep / invisible true | "AB"U+200B U+0041 U+0042 | "AB"Removed 1 invisible character | {"defaultPrefix":false,"atOne":true,"contains":true,"foundAt":1}{"defaultPrefix":true,"atOne":false,"contains":true,"foundAt":0} |
| Leading space direct string / keep / invisible true | " AB"U+0020 U+0041 U+0042 | " AB"No selected invisible characters found | {"defaultPrefix":false,"atOne":true,"contains":true,"foundAt":1}{"defaultPrefix":false,"atOne":true,"contains":true,"foundAt":1} |
| Exact prefix direct string / keep / invisible true | "AB"U+0041 U+0042 | "AB"No selected invisible characters found | {"defaultPrefix":true,"atOne":false,"contains":true,"foundAt":0}{"defaultPrefix":true,"atOne":false,"contains":true,"foundAt":0} |
| Later token direct string / keep / invisible true | "XAB"U+0058 U+0041 U+0042 | "XAB"No selected invisible characters found | {"defaultPrefix":false,"atOne":true,"contains":true,"foundAt":1}{"defaultPrefix":false,"atOne":true,"contains":true,"foundAt":1} |
The token moves while a contains check stays true
The first authored string consists of U+200B followed by AB. The homepage callback deletes the selected leading character with the invisible checkbox enabled and dash mode set to Keep. Before that operation, indexOf locates AB at one, the explicit position-one prefix test succeeds, and the default prefix test fails. Afterwards indexOf returns zero, the position-one test fails, and the default prefix test succeeds. includes reports true in both branches. These independently recorded predicates show why finding a token somewhere cannot establish that it begins at the position required by a field contract. The experiment does not infer which position an unknown pasted value ought to use.
The space and later-token controls retain their positions
Our leading ordinary-space control remains space plus AB, so its successful position-one check persists after cleaning. XAB behaves the same way because the initial X is also retained. The exact AB reference passes the default check throughout and fails the explicit position-one check throughout. These controls separate selective deletion from automatic trimming or arbitrary prefix removal. All strings here contain only basic letters plus the stated leading character, so their measured indexes are simple UTF-16 offsets. Earlier guides cover offsets produced by regex matching and sentence segmentation. This page instead evaluates a boolean predicate with a caller-supplied start position and contrasts it with an unanchored contains test.
Apply a prefix rule to the representation it governs
If the application requires a token at the beginning of the final value, evaluate that rule on the final value with the intended position. Avoid carrying a successful pre-cleaning position-one test forward as proof about the edited string. If a leading space or another prefix is meaningful, retain that policy explicitly; this tool does not decide that ordinary spaces should disappear. Keep original and final values beside the predicate results when debugging a mismatch. Our downloadable script fixes the search token at AB and records all four checks, so there is no hidden dynamic pattern or remote validation step. A changed prefix result establishes this local positional effect only, without identifying an author or a statistical watermark.
Reproduce this test
Save reproduce.cjs and tested-app.js in the same folder. Run the command below with Node.js. The harness prints its runtime, script SHA-256 and every measured row. Compare those rows with the original record. Using a newer script or runtime creates a new experiment; retain the version information with your rerun.
node reproduce.cjsReference and next check
ECMAScript startsWith provides the relevant primary definition. The table and fixture analysis are original measurements. For broader inspection, use our Unicode inspector. Read the scope distinction before interpreting cleanup as a watermark result.