summaryrefslogtreecommitdiff
path: root/argv.Match.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-27 18:39:18 -0500
committerJeff Carr <[email protected]>2025-10-27 18:39:18 -0500
commit4b096312a8ad49d0079242dc274c7c4a8a2cb31a (patch)
tree3621600ec15dc43ae552dbd45fe5d926c7cf2722 /argv.Match.go
parent8a0353dfd94e24d2b1a67a2b5c1cdac37c91ad35 (diff)
trying to fix helpv0.0.48
Diffstat (limited to 'argv.Match.go')
-rw-r--r--argv.Match.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/argv.Match.go b/argv.Match.go
index e9670a7..f06f0f7 100644
--- a/argv.Match.go
+++ b/argv.Match.go
@@ -19,3 +19,18 @@ func (pb *Argv) IsMatch(match string) bool {
}
return true
}
+
+func Len() int {
+ counter := 0
+ for _, s := range PB.Real {
+ s = strings.TrimSpace(s)
+ if s == "" {
+ continue
+ }
+ if strings.HasPrefix(s, "--") {
+ continue
+ }
+ counter += 1
+ }
+ return counter
+}