commit 902743cdafc9dd010474f7f1ee21830221220e07
parent 561a20cb9fee8483b6fd74f087b1640acf8d4aa6
Author: Sebastian <sebastian@sebsite.pw>
Date: Fri, 11 Mar 2022 18:34:57 -0500
all: fix typos and misc grammatical issues
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/path/README b/path/README
@@ -23,7 +23,7 @@ most cases, but you may prefer to allocate it elsewhere depending on your needs.
// Statically allocated
static let buf = path::buffer { ... };
- pathbuf::reset(&buf);
+ path::reset(&buf);
// Heap allocated
let buf = alloc(path::init());
diff --git a/sort/search.ha b/sort/search.ha
@@ -3,7 +3,7 @@
// Performs a binary search over a sorted slice. 'in' shall be the sorted slice,
// and 'sz' shall be the size of each array member. The 'cmp' function will be
-// called with the key value and an array member, and shall return a integer
+// called with the key value and an array member, and shall return an integer
// less than, equal to, or greater than zero if the key is, respectively, less
// than, equal to, or greater than the array member.
export fn search(
diff --git a/strconv/itos.ha b/strconv/itos.ha
@@ -29,17 +29,17 @@ export fn i64tosb(i: i64, b: base) const str = {
return *(&s: *str);
};
-// Converts a i32 to a string in the given base. The return value is statically
+// Converts an i32 to a string in the given base. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn i32tosb(i: i32, b: base) const str = i64tosb(i, b);
-// Converts a i16 to a string in the given base. The return value is statically
+// Converts an i16 to a string in the given base. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn i16tosb(i: i16, b: base) const str = i64tosb(i, b);
-// Converts a i8 to a string in the given base. The return value is statically
+// Converts an i8 to a string in the given base. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn i8tosb(i: i8, b: base) const str = i64tosb(i, b);
@@ -49,27 +49,27 @@ export fn i8tosb(i: i8, b: base) const str = i64tosb(i, b);
// [[strings::dup]] to duplicate the result.
export fn itosb(i: int, b: base) const str = i64tosb(i, b);
-// Converts a i64 to a string in base 10. The return value is statically
+// Converts an i64 to a string in base 10. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn i64tos(i: i64) const str = i64tosb(i, base::DEC);
-// Converts a i32 to a string in base 10. The return value is statically
+// Converts an i32 to a string in base 10. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn i32tos(i: i32) const str = i64tos(i);
-// Converts a i16 to a string in base 10. The return value is statically
+// Converts an i16 to a string in base 10. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn i16tos(i: i16) const str = i64tos(i);
-// Converts a i8 to a string in base 10. The return value is statically
+// Converts an i8 to a string in base 10. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn i8tos(i: i8) const str = i64tos(i);
-// Converts a int to a string in base 10. The return value is statically
+// Converts an int to a string in base 10. The return value is statically
// allocated and will be overwritten on subsequent calls; see [[strings::dup]] to
// duplicate the result.
export fn itos(i: int) const str = i64tos(i);
diff --git a/strings/cstrings.ha b/strings/cstrings.ha
@@ -41,7 +41,7 @@ export fn fromc(cstr: *const char) const str = {
return s;
};
-// Converts a Hare string to a C string. The result is allocated, the caller
+// Converts a Hare string to a C string. The result is allocated; the caller
// must free it when they're done.
export fn to_c(s: const str) *char = {
let slice: []u8 = alloc([0...], len(s) + 1);