icontains

Summary

Checks if the string contains the specified substring by performing a case-insensitive search.

Usage

public bool icontains(string substr)

Returns

true if the search succeeded (e.g. substring - regardless of case - is contained in the string) and false if the search failed (e.g. substring - regardless of case - is not found in the string).

Parameters

substr

The substring to search for.

Description

Checks if the string contains the specified substring by performing a case-insensitive search.

Examples

Case-insensitive String Search
1
2
3
4
5
import System;
 
string letters = "abcdef";
Console.log(letters.icontains("abc")); // true
Console.log(letters.icontains("ABC")); // true

Share

HTML | BBCode | Direct Link