summaryrefslogtreecommitdiff
path: root/src/Normalize.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Normalize.zig')
-rw-r--r--src/Normalize.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Normalize.zig b/src/Normalize.zig
index b5a54d1..6ef7c90 100644
--- a/src/Normalize.zig
+++ b/src/Normalize.zig
@@ -91,8 +91,8 @@ const Decomp = struct {
91 cps: []const u21 = &.{}, 91 cps: []const u21 = &.{},
92}; 92};
93 93
94/// `mapping` retrieves the decomposition mapping for a code point as per the UCD. 94// `mapping` retrieves the decomposition mapping for a code point as per the UCD.
95pub fn mapping(self: Self, cp: u21, form: Form) Decomp { 95fn mapping(self: Self, cp: u21, form: Form) Decomp {
96 var dc = Decomp{}; 96 var dc = Decomp{};
97 97
98 switch (form) { 98 switch (form) {
@@ -117,8 +117,8 @@ pub fn mapping(self: Self, cp: u21, form: Form) Decomp {
117 return dc; 117 return dc;
118} 118}
119 119
120/// `decompose` a code point to the specified normalization form, which should be either `.nfd` or `.nfkd`. 120// `decompose` a code point to the specified normalization form, which should be either `.nfd` or `.nfkd`.
121pub fn decompose( 121fn decompose(
122 self: Self, 122 self: Self,
123 cp: u21, 123 cp: u21,
124 form: Form, 124 form: Form,
@@ -587,8 +587,8 @@ fn getTrailCcc(self: Self, cp: u21) u8 {
587 return self.norm_data.ccc_data.ccc(dcp); 587 return self.norm_data.ccc_data.ccc(dcp);
588} 588}
589 589
590/// Fast check to detect if a string is already in NFC or NFD form. 590// Fast check to detect if a string is already in NFC or NFD form.
591pub fn isFcd(self: Self, str: []const u8) bool { 591fn isFcd(self: Self, str: []const u8) bool {
592 var prev_ccc: u8 = 0; 592 var prev_ccc: u8 = 0;
593 var cp_iter = CodePointIterator{ .bytes = str }; 593 var cp_iter = CodePointIterator{ .bytes = str };
594 594