-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfirst.c
More file actions
24 lines (21 loc) · 673 Bytes
/
first.c
File metadata and controls
24 lines (21 loc) · 673 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
/*******************************************************************************
* File: first.c
* Created: 2024-04-03
*
* Authors:
* Tyler Matijevich
*
* License:
* This file first.c is part of the IecString project
* released under the MIT license agreement.
******************************************************************************/
#include "main.h"
/* First occurrence of character in source */
uint32_t IecStringFirst(char *source, uint8_t character)
{
/* Guard null pointers */
if (!source)
return 0;
/* Returns a pointer to the first occurrence of character in source */
return (uint32_t)strchr(source, character);
}