gooo The Go ports lab / experimental

LITERAL STRINGS / COMPILED GOOO

Find text. Count matches.

Search a short text with Go’s literal, case-sensitive rules, executed by the Gooo port. The first position is a UTF-8 byte offset; the count uses non-overlapping matches.

Loading the compiled search program…

Original decoded input


            
          

Original decoded input


            
          

Each decoded input may contain up to 1,024 UTF-8 bytes. Empty strings are valid. Input is never trimmed or Unicode-normalized. Unpaired UTF-16 surrogates become U+FFFD during UTF-8 binding; a leading U+FEFF is preserved. Paste or drop replaces the whole input and preserves the text delivered by your browser before editor line-ending conversion. JSON string mode can supply exact escapes such as "\r\n\uD800"; JSON notation is limited to 8,192 UTF-16 code units.

Compiled result

No search has run.

Search rules

Index returns the first matching UTF-8 byte offset, or -1 when absent. For example, finding x in 가x가 returns byte offset 3. A byte offset is not a JavaScript character index.

Count counts non-overlapping occurrences. An empty needle has first offset 0 and count equal to the number of Unicode code points in the bound text plus one. Combining marks and emoji sequences may contain several code points. Search is literal and case-sensitive; it does not apply regular expressions, grapheme segmentation or normalization.

The page runs the compiled Gooo Report activity in a Worker after verifying its WebAssembly byte count and SHA-256 against the build manifest. Input conversion and transport validation use JavaScript; search and count come from the compiled ports.

Waiting for the verified program manifest.

Read the Gooo Report source · Read the string ports ↗ · Report a problem ↗