Skip to content

Modern String Contains

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › String Library › String Library › Contains

Contains

Returns true if the text appears anywhere in the string.

Syntax

Contains( s, match [, ic] )

Notes

  • O(n*m) — boolean

Examples

#import "std/strings"
using strings

dim as ustring log_ = "WARN disk almost full"

print Contains( log_, "disk" )          '' true
print Contains( log_, "DISK" )          '' false
print Contains( log_, "DISK", true )    '' true

if Contains( log_, "WARN" ) then print "needs attention"

Library: String Library
Category: String Library
Documented under: The Functions

Clone this wiki locally