hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 6114c17aa904bf2174af651902e8b9d4bd914287
parent 06e7f5f71e076ddc21310c87e4832664a2f98409
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 20 Oct 2021 10:16:39 +0200

fnmatch: fix up docs

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mfnmatch/fnmatch.ha | 17+++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/fnmatch/fnmatch.ha b/fnmatch/fnmatch.ha @@ -26,21 +26,18 @@ type question = void; type end = void; type token = (rune | bracket | star | question | end); -// Check whether the [[string]] matches the [[pattern]] which is a shell -// wildcard pattern with the following matching rules: +// Check whether the 'string' matches the 'pattern', which is a shell wildcard +// pattern with the following matching rules: +// // - '?' matches any single character // - '*' matches any string, including the empty string -// - '[' and ']' enclose a bracket expression. Matching rules for bracket -// expressions are identical to those of bracket subexpressions in regular -// expressions, except that '!' takes the role of '^' when placed right after -// the opening '['. -// - '\' escapes the following character, e. g. "\*" only matches literal '*' -// and has no special meaning +// - '[' and ']' enclose a bracket expression. Matching rules for bracket expressions are identical to those of bracket subexpressions in regular expressions, except that '!' takes the role of '^' when placed right after the opening '['. +// - '\' escapes the following character, e. g. "\*" only matches literal '*' and has no special meaning // - all other characters only match themselves // // A set of flags that alter the matching behavior may be passed to -// [[fnmatch::fnmatch]]. For an explanation of their meaning, see [ -// [fnmatch::flags]]. +// [[fnmatch::fnmatch]]. For an explanation of their meaning, see +// [[fnmatch::flags]]. export fn fnmatch(pattern: str, string: str, flag: flags...) bool = { let fl: flags = 0; for (let i = 0z; i < len(flag); i += 1) {