tokenutil

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitCamelCase

func SplitCamelCase(s string) []string

SplitCamelCase splits a CamelCase identifier into words, correctly handling consecutive uppercase runs like "HTTPClient" -> ["HTTP", "Client"]. Go's RE2 lacks lookaheads, so we use a two-pass approach:

  1. Split with camelCaseRe (which yields ["H","T","T","P","Client"] for "HTTPClient")
  2. Merge consecutive single-uppercase-letter tokens into one string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL