#DOCUMENTATION by cg
class: StringUtilities class
comment/format in: #stringMatchFunctionFor:glob:regex:caseSensitive:
--- a/StringUtilities.st Thu May 02 17:35:13 2019 +0200
+++ b/StringUtilities.st Thu May 02 17:39:22 2019 +0200
@@ -321,10 +321,11 @@
!StringUtilities class methodsFor:'matching'!
stringMatchFunctionFor:aMultiPattern glob:searchForGlobPattern regex:searchForRegexPattern caseSensitive:searchIsCaseSensitive
- "generates a check function which - given a string - checks for a match;
- The match may contain multiple patterns, separated by
- ';' (for and-search) or '|' (for or-search).
- If the pattern is invalid, nil is returned and an Information-notification
+ "generates a check function which - given a string - checks for a match.
+ The match-pattern argument aMultiPattern
+ may contain multiple patterns,
+ separated by ';' (for and-search) or '|' (for or-search).
+ If the pattern is invalid, nil is returned and an information-notification
is signalled"
|combinator stringToSearchFor stringsToSearchFor checkFunction|
@@ -453,7 +454,10 @@
fn value:' aa '.
fn value:' bbb '.
fn value:' aa bb '.
-
+ "
+
+ "
+ |fn|
fn := self stringMatchFunctionFor:'aaa;bbb' glob:false regex:false caseSensitive:false.
fn value:' aaa '.
fn value:' aa '.
@@ -461,8 +465,18 @@
fn value:' aa bb '.
fn value:' aaa bb '.
fn value:' aaa bbb '.
+ "
"
+ |fn|
+ fn := self stringMatchFunctionFor:'aa*;bb*' glob:true regex:false caseSensitive:false.
+ fn value:' aaa '.
+ fn value:' aa '.
+ fn value:' bbb '.
+ fn value:' aa bb '.
+ fn value:' aaa bb '.
+ fn value:' aaa bbb '.
+ "
"Created: / 02-05-2019 / 17:32:12 / Claus Gittinger"
! !
@@ -477,5 +491,9 @@
version
^ '$Header$'
+!
+
+version_CVS
+ ^ '$Header$'
! !