Crates.io | split-identifier |
lib.rs | split-identifier |
version | 0.1.0 |
source | src |
created_at | 2025-01-09 21:01:10.785904+00 |
updated_at | 2025-01-09 21:01:10.785904+00 |
description | Rust package that provides functions to split programmatic identifiers according to case conventions. |
homepage | |
repository | https://github.com/johnstonskj/rust-split-identifier.git |
max_upload_size | |
id | 1510539 |
size | 19,877 |
This package provides functions to split programmatic identifiers according to case conventions. This package takes it's implementation directly from the convert_case crate.
This package provides two functions, described below, and uses the segmentation code from the convert_case crate to break a long identifier into it's component parts according to word breaks identified by it's case convention. For example the identifier "/halt after 3 attempts/" is represented in the following manner in different conventions:
Convention | Breaks | Identifier | First Letter |
---|---|---|---|
[Lower] Camel | Ll·Lu, Nd | haltAfter3Tries |
Ll |
UpperCamel | Ll·Lu, Nd | haltAfter3Tries |
Lu |
[Lower] Snake | '_' | halt_after_3_tries |
Ll |
UpperSnake | '_' | HALT_AFTER_3_TRIES |
Lu |
Kebab | '-' | halt-after-3-tries |
Ll |
UpperKebab | '-' | HALT-AFTER-3-TRIES |
Lu |
Train | '-' | Halt-After-3-Tries |
Lu |
TBD
split_id_string
and guess_id_case
.case
and segmentation
from the convert_case
crate and
edits out unnecessary elements.