Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
string [2019/04/19 02:41] – korshun | string [2019/04/19 02:43] – korshun |
---|
''%%""%%'' is an empty string, i.e. a valid string of length 0. It can be passed to any function and will work as expected. | ''%%""%%'' is an empty string, i.e. a valid string of length 0. It can be passed to any function and will work as expected. |
| |
===== Comparing strings for equality ===== | ===== Checking string equality ===== |
| |
<note warning>Do not use ''=='' to check if strings are equal.</note> | <note warning>Do not use ''=='' to check if strings are equal.</note> |
''bool StrEquals(str a, str b)'' | ''bool StrEquals(str a, str b)'' |
| |
And also a case-insensitive version: | Internally, this function calls harder to use [[zdoom>StrCmp]], but they could just as well be implemented using a combination of [[zdoom>StrLen]] and [[zdoom>GetChar]]. |
| |
''bool StrIEquals(str a, str b)'' | There is also a case-insensitive version: |
| |
Internally, these functions call harder to use [[zdoom>StrCmp]], but they could just as well be implemented using a combination of [[zdoom>StrLen]] and [[zdoom>GetChar]]. | ''bool StrIEquals(str a, str b)'' |
| |
| It's implemented using [[zdoom>StrICmp]]. |
| |
| |