-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfind.c
More file actions
25 lines (22 loc) · 704 Bytes
/
find.c
File metadata and controls
25 lines (22 loc) · 704 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
/*******************************************************************************
* File: find.c
* Created: 2024-04-02
*
* Authors:
* Tyler Matijevich
*
* License:
* This file find.c is part of the IecString project
* released under the MIT license agreement.
******************************************************************************/
#include "main.h"
/* Find substring in source */
uint32_t IecStringFind(char *source, char *find)
{
/* Guard null pointers */
if (!source || !find)
return 0;
/* Returns a pointer to the first occurence of find in source */
/* Returns a null pointer if find is not in source */
return (uint32_t)strstr(source, find);
}