Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
7
Task/String-matching/Julia/string-matching.jl
Normal file
7
Task/String-matching/Julia/string-matching.jl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
startswith("abcd","ab") #returns true
|
||||
findfirst("ab", "abcd") #returns 1:2, indices range where string was found
|
||||
endswith("abcd","zn") #returns false
|
||||
match(r"ab","abcd") != Nothing #returns true where 1st arg is regex string
|
||||
for r in eachmatch(r"ab","abab")
|
||||
println(r.offset)
|
||||
end #returns 1, then 3 matching the two starting indices where the substring was found
|
||||
Loading…
Add table
Add a link
Reference in a new issue