String matching: Difference between revisions

Content added Content deleted
(add bqn)
Line 1,683: Line 1,683:
=={{header|Dyalect}}==
=={{header|Dyalect}}==


<lang Dyalect>var value = "abcd".startsWith("ab")
<lang Dyalect>var value = "abcd".StartsWith("ab")
value = "abcd".endsWith("zn") //returns false
value = "abcd".EndsWith("zn") //returns false
value = "abab".contains("bb") //returns false
value = "abab".Contains("bb") //returns false
value = "abab".contains("ab") //returns true
value = "abab".Contains("ab") //returns true
var loc = "abab".indexOf("bb") //returns -1
var loc = "abab".IndexOf("bb") //returns -1
loc = "abab".indexOf("ab") //returns 0</lang>
loc = "abab".IndexOf("ab") //returns 0</lang>


=={{header|E}}==
=={{header|E}}==