Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
11
Task/String-matching/E/string-matching.e
Normal file
11
Task/String-matching/E/string-matching.e
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
def f(string1, string2) {
|
||||
println(string1.startsWith(string2))
|
||||
|
||||
var index := 0
|
||||
while ((index := string1.startOf(string2, index)) != -1) {
|
||||
println(`at $index`)
|
||||
index += 1
|
||||
}
|
||||
|
||||
println(string1.endsWith(string2))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue