முதன்மை உள்ளடக்கத்துக்குச் செல்லவும்

strequal

எச்சரிக்கை

செயல்பாடு என்பது omp v1.1.0.2612 பதிப்பில் சேர்க்கப்பட்டது. இது முந்தைய பதிப்புகளில் இயங்காது!

Description​

Compares two strings to see if they are the same.

NameDescription
const string1[]The first string to compare.
const string2[]The second string to compare.
bool:ignorecase (optional)When set to true, the case doesn't matter - HeLLo is the same as Hello. When false, they're not the same.
length (optional)When this length is set, the first x chars will be compared - doing "Hello" and "Hell No" with a length of 4 will say it's the same string.

Returns​

true if the strings match each other on given length, false otherwise.

Examples​

new string1[] = "Hello World";
new string2[] = "Hello World";

// Check if the strings are the same
if (strequal(string1, string2))
{
print("Strings are equal.");
}
else
{
print("Strings are not equal.");
}

Notes​

குறிப்பு

This is a conveniece function that depends on strcmp.

  • strcmp: Search for a string in another string.