Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreif committed Dec 3, 2024
1 parent ed4d31e commit a3c3ea6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Text.mo
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ module {
/// ```motoko include=import
/// let text = Text.fromArray(['A', 'v', 'o', 'c', 'a', 'd', 'o']); // "Avocado"
/// ```
public let fromArray : (a : [Char]) -> Text = fromIter(a.vals());
public func fromArray(a : [Char]) -> Text = fromIter(a.vals());

/// Converts the given `[var Char]` to a `Text` value.
///
/// ```motoko include=import
/// let text = Text.fromArray(['E', 'g', 'g', 'p', 'l', 'a', 'n', 't']); // "Eggplant"
/// let text = Text.fromVarArray(['E', 'g', 'g', 'p', 'l', 'a', 'n', 't']); // "Eggplant"
/// ```
public let fromVarArray : (a : [var Char]) -> Text = fromIter(a.vals());
public func fromVarArray(a : [var Char]) -> Text = fromIter(a.vals());

/// Iterates over each `Char` value in the given `Text`.
///
Expand Down Expand Up @@ -90,7 +90,7 @@ module {
func _ {
switch (cs.next()) {
case (?c) { c };
case (null) { Prim.trap("Text.toArray") };
case null { Prim.trap("Text.toArray") };
};
}
)
Expand Down

0 comments on commit a3c3ea6

Please sign in to comment.