String matching: Difference between revisions
no edit summary
Puppydrum64 (talk | contribs) |
No edit summary |
||
Line 4,716:
{{works with|Visual Basic|VB6 Standard}}
works the same as in VBA, see [[String_matching#VBA]]
=={{header|Vlang}}==
{{trans|Delphi}}
<lang vlang>fn main() {
str := 'abcd'
println(str.starts_with('ab')) // True
println(str.ends_with('zn')) // False
println(str.contains('bb')) // False
println(str.contains('ab')) // True
println(str.index('b') or {-1}) // 1 // Vlang arrays are 0 based, so first char position is 0 and no result assigned -1
}</lang>
{{out}}
<pre>
true
false
false
true
1
</pre>
=={{header|Wren}}==
|