Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 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