1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Traits to deal with
//!
//! **a)** "detailed display" of… details.
//! **b)** "proper case" of strings for labels etc.
//!
//! See: [DetailedDisplay], [ProperCaseExt], [NewsPaperCaseExt]
//!
/// A trait akin to `.to_string()` etc., but meant for delivery of more
/// detailed information, leaving the other functions to deal with simpler
/// things.
/// An extension trait for converting strings into (semi-)"Proper Case."
///
/// This is a "smart" title-casing for "hummie eyes,"
/// suitable for labels, names, and titles. It capitalizes
/// any letter that follows a space, hyphen, or other
/// non-alphabetic character. It doesn't give special
/// treatment to 'words' like "a", "with", and such, however.
///
/// # Example
///
/// ```
/// use rpgassist::ext::ProperCaseExt; // (Adjust path as needed)
///
/// let s = "a test-string (with fawns)";
/// assert_eq!(s.proper_case(), "A Test-String (With Fawns)");
///
/// let s2 = "aDaM cApLiTtEr";
/// assert_eq!(s2.proper_case(), "Adam Caplitter");
/// ```
/// A trait for functionality that extends on [ProperCaseExt] to deal with
/// special word cases.
///
/// TODO: …someday™