Document positional handling of lowercase Greek sigma
Description
In heck 0.5.0, lowercase conversion uses final sigma when uppercase sigma is the last scalar in a word. This differs from Rust string lowercasing's contextual rule and affects lowercase-based conversion methods and wrappers. Could the intended behavior be documented for callers who expect contextual lowercasing?
Steps to reproduce
With heck = "0.5.0":
use heck::ToSnakeCase;
assert_eq!("Σ".to_snake_case(), "ς");
assert_eq!("Σ".to_lowercase(), "σ");
assert_eq!("AΣ1".to_snake_case(), "aσ1");
assert_eq!("AΣ1".to_lowercase(), "aς1");
All assertions pass and show the observed outputs.
Expected behavior
Heck documents Unicode awareness but does not specify Unicode default contextual lowercasing as a contract. The question is whether to document its distinct positional rule.
Actual behavior
A sigma at the end of a word becomes ς, including a one-scalar word. A sigma followed by a digit in the same word becomes σ, even when Rust string lowercasing chooses ς.
Additional context
Issue #1 led to positional final-sigma handling before word boundaries.
Change history
- v1 · created · 2026-11-29 15:45 UTC
{ "title": "Document positional handling of lowercase Greek sigma", "body": "## Description\n\nIn heck 0.5.0, lowercase conversion uses final sigma when uppercase sigma is the last scalar in a word. This differs from Rust string lowercasing's contextual rule and affects lowercase-based conversion methods and wrappers. Could the intended behavior be documented for callers who expect contextual lowercasing?\n\n## Steps to reproduce\n\nWith `heck = \"0.5.0\"`:\n\n```rust\nuse heck::ToSnakeCase;\n\nassert_eq!(\"Σ\".to_snake_case(), \"ς\");\nassert_eq!(\"Σ\".to_lowercase(), \"σ\");\nassert_eq!(\"AΣ1\".to_snake_case(), \"aσ1\");\nassert_eq!(\"AΣ1\".to_lowercase(), \"aς1\");\n```\n\nAll assertions pass and show the observed outputs.\n\n## Expected behavior\n\nHeck documents Unicode awareness but does not specify Unicode default contextual lowercasing as a contract. The question is whether to document its distinct positional rule.\n\n## Actual behavior\n\nA sigma at the end of a word becomes `ς`, including a one-scalar word. A sigma followed by a digit in the same word becomes `σ`, even when Rust string lowercasing chooses `ς`.\n\n## Additional context\n\n[Issue #1](https://github.com/withoutboats/heck/issues/1) led to positional final-sigma handling before word boundaries.", "validity": "reported", "upstream_status": "not_reported" }