summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clap.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/clap.zig b/clap.zig
index 2345163..38b2c27 100644
--- a/clap.zig
+++ b/clap.zig
@@ -116,7 +116,7 @@ fn countParams(str: []const u8) usize {
116 var res: usize = 0; 116 var res: usize = 0;
117 var it = std.mem.splitScalar(u8, str, '\n'); 117 var it = std.mem.splitScalar(u8, str, '\n');
118 while (it.next()) |line| { 118 while (it.next()) |line| {
119 const trimmed = std.mem.trimLeft(u8, line, " \t"); 119 const trimmed = std.mem.trimStart(u8, line, " \t");
120 if (std.mem.startsWith(u8, trimmed, "-") or 120 if (std.mem.startsWith(u8, trimmed, "-") or
121 std.mem.startsWith(u8, trimmed, "<")) 121 std.mem.startsWith(u8, trimmed, "<"))
122 { 122 {
@@ -1426,7 +1426,7 @@ pub fn help(
1426 var res: usize = std.math.maxInt(usize); 1426 var res: usize = std.math.maxInt(usize);
1427 var it = std.mem.tokenizeScalar(u8, description, '\n'); 1427 var it = std.mem.tokenizeScalar(u8, description, '\n');
1428 while (it.next()) |line| : (first_line = false) { 1428 while (it.next()) |line| : (first_line = false) {
1429 const trimmed = std.mem.trimLeft(u8, line, " "); 1429 const trimmed = std.mem.trimStart(u8, line, " ");
1430 const indent = line.len - trimmed.len; 1430 const indent = line.len - trimmed.len;
1431 1431
1432 // If the first line has no indentation, then we ignore the indentation of the 1432 // If the first line has no indentation, then we ignore the indentation of the
@@ -1460,7 +1460,7 @@ pub fn help(
1460 else 1460 else
1461 raw_line[@min(min_description_indent, raw_line.len)..]; 1461 raw_line[@min(min_description_indent, raw_line.len)..];
1462 1462
1463 const line = std.mem.trimLeft(u8, indented_line, " "); 1463 const line = std.mem.trimStart(u8, indented_line, " ");
1464 if (line.len == 0) { 1464 if (line.len == 0) {
1465 non_emitted_newlines += 1; 1465 non_emitted_newlines += 1;
1466 continue; 1466 continue;