-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfirst_in.c
More file actions
26 lines (23 loc) · 750 Bytes
/
first_in.c
File metadata and controls
26 lines (23 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*******************************************************************************
* File: first_in.c
* Created: 2024-04-03
*
* Authors:
* Tyler Matijevich
*
* License:
* This file first_in.c is part of the IecString project
* released under the MIT license agreement.
******************************************************************************/
#include "main.h"
/* First occurrence in source of any character from find */
uint32_t IecStringFirstIn(char *source, char *find)
{
/* Guard null pointers */
if (!source || !find)
/* Return null address */
return 0;
/* Returns a pointer to the first occurrence in source of
any characters from find */
return (uint32_t)strpbrk(source, find);
}