Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/String-matching/Objeck/string-matching.objeck
Normal file
13
Task/String-matching/Objeck/string-matching.objeck
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
bundle Default {
|
||||
class Matching {
|
||||
function : Main(args : System.String[]) ~ Nil {
|
||||
"abcd"->StartsWith("ab")->PrintLine(); # returns true
|
||||
"abcd"->EndsWith("zn")->PrintLine(); # returns false
|
||||
("abab"->Find("bb") <> -1)->PrintLine(); # returns false
|
||||
("abab"->Find("ab") <> -1)->PrintLine(); # returns true
|
||||
loc := "abab"->Find("bb"); # returns -1
|
||||
loc := "abab"->Find("ab"); # returns 0
|
||||
loc := "abab"->Find("ab", loc + 1); # returns 2
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue