summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
Diffstat (limited to 'clap.zig')
-rw-r--r--clap.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/clap.zig b/clap.zig
index 2fc70ca..b603222 100644
--- a/clap.zig
+++ b/clap.zig
@@ -132,7 +132,7 @@ fn countParams(str: []const u8) usize {
132 @setEvalBranchQuota(std.math.maxInt(u32)); 132 @setEvalBranchQuota(std.math.maxInt(u32));
133 133
134 var res: usize = 0; 134 var res: usize = 0;
135 var it = mem.split(u8, str, "\n"); 135 var it = mem.splitScalar(u8, str, '\n');
136 while (it.next()) |line| { 136 while (it.next()) |line| {
137 const trimmed = mem.trimLeft(u8, line, " \t"); 137 const trimmed = mem.trimLeft(u8, line, " \t");
138 if (mem.startsWith(u8, trimmed, "-") or 138 if (mem.startsWith(u8, trimmed, "-") or
@@ -1170,7 +1170,7 @@ pub fn help(
1170 1170
1171 var first_line = true; 1171 var first_line = true;
1172 var res: usize = std.math.maxInt(usize); 1172 var res: usize = std.math.maxInt(usize);
1173 var it = mem.tokenize(u8, description, "\n"); 1173 var it = mem.tokenizeScalar(u8, description, '\n');
1174 while (it.next()) |line| : (first_line = false) { 1174 while (it.next()) |line| : (first_line = false) {
1175 const trimmed = mem.trimLeft(u8, line, " "); 1175 const trimmed = mem.trimLeft(u8, line, " ");
1176 const indent = line.len - trimmed.len; 1176 const indent = line.len - trimmed.len;
@@ -1195,7 +1195,7 @@ pub fn help(
1195 }; 1195 };
1196 1196
1197 const description = param.id.description(); 1197 const description = param.id.description();
1198 var it = mem.split(u8, description, "\n"); 1198 var it = mem.splitScalar(u8, description, '\n');
1199 var first_line = true; 1199 var first_line = true;
1200 var non_emitted_newlines: usize = 0; 1200 var non_emitted_newlines: usize = 0;
1201 var last_line_indentation: usize = 0; 1201 var last_line_indentation: usize = 0;
@@ -1242,7 +1242,7 @@ pub fn help(
1242 try description_writer.newline(); 1242 try description_writer.newline();
1243 } 1243 }
1244 1244
1245 var words = mem.tokenize(u8, line, " "); 1245 var words = mem.tokenizeScalar(u8, line, ' ');
1246 while (words.next()) |word| 1246 while (words.next()) |word|
1247 try description_writer.writeWord(word); 1247 try description_writer.writeWord(word);
1248 1248