Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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