SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D :shared3p >
D uint kl_strIndexOf (D xor_uint8[[1]] str, D xor_uint8[[1]] pat)
 

Detailed Description

Function for finding the index of a given pattern in the input string.

Note
D - shared3p protection domain
Supported types - xor_uint8
Precondition
the needle is not longer than the haystack
Parameters
str- the haystack
pat- the needle
Returns
returns the position of the needle in the haystack
returns size(str) if the pat is not a substring of str
Leakage
None

Function Documentation

◆ kl_strIndexOf()

D uint kl_strIndexOf ( D xor_uint8[[1]]  str,
D xor_uint8[[1]]  pat 
)