• Home
Name Date Size #Lines LOC

..--

src/04-Jul-2025-873510

.android-checksum.jsonD04-Jul-20251.7 KiB11

.cargo-checksum.jsonD04-Jul-20251.2 KiB11

Android.bpD04-Jul-20251.1 KiB4742

CHANGELOG.mdD04-Jul-2025709 2617

Cargo.tomlD04-Jul-2025892 3533

LICENSED04-Jul-202510.6 KiB202169

LICENSE-APACHED04-Jul-202510.6 KiB202169

METADATAD04-Jul-2025358 1817

MODULE_LICENSE_APACHE2D04-Jul-20250

README.mdD04-Jul-20251.9 KiB5439

TEST_MAPPINGD04-Jul-2025922 4645

cargo_embargo.jsonD04-Jul-202568 55

README.md

1# **heck** is a case conversion library
2
3!["I specifically requested the opposite of this."](./no_step_on_snek.png)
4
5This library exists to provide case conversion between common cases like
6CamelCase and snake_case. It is intended to be unicode aware, internally
7consistent, and reasonably well performing.
8
9## Definition of a word boundary
10
11Word boundaries are defined by non-alphanumeric characters, as well as
12within those words in this manner:
13
141. If an uppercase character is followed by lowercase letters, a word
15boundary is considered to be just prior to that uppercase character.
162. If multiple uppercase characters are consecutive, they are considered to
17be within a single word, except that the last will be part of the next word
18if it is followed by lowercase characters (see rule 1).
19
20That is, "HelloWorld" is segmented `Hello|World` whereas "XMLHttpRequest" is
21segmented `XML|Http|Request`.
22
23Characters not within words (such as spaces, punctuations, and underscores)
24are not included in the output string except as they are a part of the case
25being converted to. Multiple adjacent word boundaries (such as a series of
26underscores) are folded into one. ("hello__world" in snake case is therefore
27"hello_world", not the exact same string). Leading or trailing word boundary
28indicators are dropped, except insofar as CamelCase capitalizes the first word.
29
30## Cases contained in this library:
31
321. UpperCamelCase
332. lowerCamelCase
343. snake_case
354. kebab-case
365. SHOUTY_SNAKE_CASE
376. Title Case
387. SHOUTY-KEBAB-CASE
398. Train-Case
40
41## MSRV
42
43The minimum supported Rust version for this crate is 1.56.0. This may change in
44minor or patch releases, but we probably won't ever require a very recent
45version. If you would like to have a stronger guarantee than that, please open
46an issue.
47
48## License
49
50heck is distributed under the terms of both the MIT license and the
51Apache License (Version 2.0).
52
53See LICENSE-APACHE and LICENSE-MIT for details.
54