-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhelperfuncs.c
30 lines (28 loc) · 1.12 KB
/
helperfuncs.c
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
27
28
29
/*******************************************************************************
* File: helperfuncs.c
* Author: Will Flores [email protected]
* Usage: Implements String functionality.
* Description: This file contains some string handling functionality.
*
* Environment: Windows 7, x64 build
* Built in HEW with MC16 Series Compiler V.5.44 Release 00
* Notes: The Timers are cut in half as far as duration is concerned
* Revisions: 0.0, Initial Release
*
* Created on April 12, 2012
*******************************************************************************/
#include "helperfuncs.h"
/*******************************************************************************
* Purpose: This function counts the letters in a string.
* Passed: Array of chars (a string).
* Locals: count - counts the chars in a string.
* Returned: Number of chars in a string.
* Author: Will Flores [email protected]
*******************************************************************************/
int strlength(char str[]) {
int count = 0;
while(str[count]) {
++count;
}
return count;
}