# CompareString

## Description

Returns 1 if the two strings are equal to each other, otherwise returns 0. By default this is case insensitive, use the ignoreCase parameter to set case sensitivity. Use the maxChars parameter to specify the maximum number of characters to check, if the strings match after that many characters have been checked then they are considered equal. Use a value of -1 to check all characters regardless of length.

## Definition

integer CompareString( str, str2 )

int agk::CompareString( const char* str, const char* str2 )

integer CompareString( str, str2, ignoreCase, maxChars )

int agk::CompareString( const char* str, const char* str2, int ignoreCase, int maxChars )

## Parameters

- str - The first string to check
- str2 - The second string to check
- ignoreCase - 1 to ignore case when comparing, 0 to match case
- maxChars - The number of characters to check, minus 1 for all