FireBirdLib - Topfield TMS PVR TAP Programming Library
StringEndsWith.c
Go to the documentation of this file.
1
#include <string.h>
2
#include "
libFireBird.h
"
3
4
bool
StringEndsWith
(
const
char
*text,
const
char
*postfix)
5
{
6
TRACEENTER
();
7
8
const
char
*p;
9
int
l, i;
10
bool
ret = FALSE;
11
12
if
(!text || !*text || !postfix || !*postfix)
13
{
14
TRACEEXIT
();
15
return
FALSE;
16
}
17
18
l = strlen(text);
19
i = strlen(postfix);
20
21
if
(l >= i)
22
{
23
p = &text[l - i];
24
ret = (memcmp(p, postfix, i) == 0);
25
}
26
27
TRACEEXIT
();
28
return
ret;
29
}
StringEndsWith
bool StringEndsWith(const char *text, const char *postfix)
Definition:
StringEndsWith.c:4
libFireBird.h
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
string
StringEndsWith.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3