Main Page
Namespaces
Classes
Files
File List
File Members
src
ros_lib
vexstrlen.h
Go to the documentation of this file.
1
#ifndef _ROSSERIAL_VEX_CORTEX_VEXSTRLEN_H_
2
#define _ROSSERIAL_VEX_CORTEX_VEXSTRLEN_H_
3
4
#define MAX_VEXSTRLEN 2048
5
6
/* substitute string length function.
7
* if the length is too long or if there is no null terminator, behavior is undefined.
8
*/
9
inline
uint32_t
vexstrlen
(
const
char
* st) {
10
for
(
int
i = 0; i <
MAX_VEXSTRLEN
; i++) {
11
if
(st[i] ==
'\0'
)
return
i;
12
}
13
return
MAX_VEXSTRLEN
;
14
}
15
16
#endif
MAX_VEXSTRLEN
#define MAX_VEXSTRLEN
Definition:
vexstrlen.h:4
vexstrlen
uint32_t vexstrlen(const char *st)
Definition:
vexstrlen.h:9
rosserial_vex_cortex
Author(s): Cannon
autogenerated on Fri Jun 7 2019 22:03:06