Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
str_utils.h
Go to the documentation of this file.
1#ifndef STR_UTILS_H
2#define STR_UTILS_H
3#include <stddef.h>
4
5namespace wombat {
6 const char *stripTrailingZeros(const float value);
7 size_t stripLeadingWS(char *str);
8 size_t stripTrailingWS(char *str);
9 size_t stripWS(char *str);
10
11 bool get_cp_destination(const char *input_ptr, const size_t input_len, int &dest, const char **dest_filename_ptr, size_t &dest_output_len);
12}
13#endif //STR_UTILS_H
Definition: str_utils.cpp:14
const char * stripTrailingZeros(const float value)
Returns a pointer to a string representation of value, with trailing zeros removed.
Definition: str_utils.cpp:27
size_t stripWS(char *str)
Removes leading and trailing whitespace characters from str.
Definition: str_utils.cpp:120
size_t stripLeadingWS(char *str)
Removes leading whitespace characters from str.
Definition: str_utils.cpp:58
bool get_cp_destination(const char *input_ptr, const size_t input_len, int &dest, const char **dest_filename_ptr, size_t &dest_output_len)
extract the destination type and filename from a string of the form dest:filename.
Definition: str_utils.cpp:138
size_t stripTrailingWS(char *str)
Removes trailing whitespace characters from str.
Definition: str_utils.cpp:88
char str[10]
Definition: test_str_utils.cpp:7