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
#define MAX_VEXSTRLEN
Definition: vexstrlen.h:4
uint32_t vexstrlen(const char *st)
Definition: vexstrlen.h:9


rosserial_vex_cortex
Author(s): Cannon
autogenerated on Mon Jun 10 2019 14:53:45