summaryrefslogtreecommitdiff
path: root/src/DisplayWidth.zig
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-03-27 07:45:43 -0400
committerGravatar Jose Colon Rodriguez2024-03-27 07:45:43 -0400
commit3836b5e24a6d13823e6d2b0d2957eed4a00b98e7 (patch)
tree8e0d31bf968ea33f286c5986595bd89e145975bd /src/DisplayWidth.zig
parentrm src/main.zig (diff)
downloadzg-3836b5e24a6d13823e6d2b0d2957eed4a00b98e7.tar.gz
zg-3836b5e24a6d13823e6d2b0d2957eed4a00b98e7.tar.xz
zg-3836b5e24a6d13823e6d2b0d2957eed4a00b98e7.zip
Rename DisplayWidthData
Diffstat (limited to 'src/DisplayWidth.zig')
-rw-r--r--src/DisplayWidth.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/DisplayWidth.zig b/src/DisplayWidth.zig
index 85d04a0..8d5eb0f 100644
--- a/src/DisplayWidth.zig
+++ b/src/DisplayWidth.zig
@@ -8,9 +8,9 @@ const testing = std.testing;
8const ascii = @import("ascii"); 8const ascii = @import("ascii");
9const CodePointIterator = @import("code_point").Iterator; 9const CodePointIterator = @import("code_point").Iterator;
10const GraphemeIterator = @import("grapheme").Iterator; 10const GraphemeIterator = @import("grapheme").Iterator;
11pub const Data = @import("DisplayWidthData"); 11pub const DisplayWidthData = @import("DisplayWidthData");
12 12
13data: *Data, 13data: *const DisplayWidthData,
14 14
15const Self = @This(); 15const Self = @This();
16 16
@@ -56,7 +56,7 @@ pub fn strWidth(self: Self, str: []const u8) usize {
56} 56}
57 57
58test "strWidth" { 58test "strWidth" {
59 var data = try Data.init(testing.allocator); 59 var data = try DisplayWidthData.init(testing.allocator);
60 defer data.deinit(); 60 defer data.deinit();
61 const self = Self{ .data = &data }; 61 const self = Self{ .data = &data };
62 62
@@ -157,7 +157,7 @@ pub fn center(
157 157
158test "center" { 158test "center" {
159 const allocator = testing.allocator; 159 const allocator = testing.allocator;
160 var data = try Data.init(allocator); 160 var data = try DisplayWidthData.init(allocator);
161 defer data.deinit(); 161 defer data.deinit();
162 const self = Self{ .data = &data }; 162 const self = Self{ .data = &data };
163 163
@@ -236,7 +236,7 @@ pub fn padLeft(
236 236
237test "padLeft" { 237test "padLeft" {
238 const allocator = testing.allocator; 238 const allocator = testing.allocator;
239 var data = try Data.init(allocator); 239 var data = try DisplayWidthData.init(allocator);
240 defer data.deinit(); 240 defer data.deinit();
241 const self = Self{ .data = &data }; 241 const self = Self{ .data = &data };
242 242
@@ -286,7 +286,7 @@ pub fn padRight(
286 286
287test "padRight" { 287test "padRight" {
288 const allocator = testing.allocator; 288 const allocator = testing.allocator;
289 var data = try Data.init(allocator); 289 var data = try DisplayWidthData.init(allocator);
290 defer data.deinit(); 290 defer data.deinit();
291 const self = Self{ .data = &data }; 291 const self = Self{ .data = &data };
292 292
@@ -339,7 +339,7 @@ pub fn wrap(
339 339
340test "wrap" { 340test "wrap" {
341 const allocator = testing.allocator; 341 const allocator = testing.allocator;
342 var data = try Data.init(allocator); 342 var data = try DisplayWidthData.init(allocator);
343 defer data.deinit(); 343 defer data.deinit();
344 const self = Self{ .data = &data }; 344 const self = Self{ .data = &data };
345 345