Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FindSortedStringCaseInsensitive.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6
7namespace Algo
8{
9 /**
10 * Finds a string in an array of sorted strings, by case-insensitive search, by using binary subdivision of the array.
11 *
12 * @param Str The string to look for.
13 * @param SortedArray The array of strings to search. The strings must be sorted lexicographically, case-insensitively.
14 * @param ArrayCount The number of strings in the array.
15 *
16 * @return The index of the found string in the array, or -1 if the string was not found.
17 */
18 int32 FindSortedStringCaseInsensitive(const TCHAR* Str, const TCHAR* const* SortedArray, int32 ArrayCount);
19
20 /**
21 * Finds a string in an array of sorted strings, by case-insensitive search, by using binary subdivision of the array.
22 *
23 * @param Str The string to look for.
24 * @param SortedArray The array of strings to search. The strings must be sorted lexicographically, case-insensitively.
25 *
26 * @return The index of the found string in the array, or -1 if the string was not found.
27 */
28 template <int32 ArraySize>
29 FORCEINLINE int32 FindSortedStringCaseInsensitive(const TCHAR* Str, const TCHAR* const (&SortedArray)[ArraySize])
30 {
32 }
33}
#define FORCEINLINE
Definition Platform.h:644
Definition Heapify.h:12
FORCEINLINE int32 FindSortedStringCaseInsensitive(const TCHAR *Str, const TCHAR *const (&SortedArray)[ArraySize])
int32 FindSortedStringCaseInsensitive(const TCHAR *Str, const TCHAR *const *SortedArray, int32 ArrayCount)