update utils append_parameters
[clinton/Smoothieware.git] / src / libs / utils.h
CommitLineData
76f53dc6
JM
1#ifndef UTILS_H
2#define UTILS_H
4eb9c745 3
423df6df 4#include <stdint.h>
4eb9c745 5#include <string>
5efaa1b1 6#include <vector>
7800d0b2 7
4eb9c745 8using std::string;
76f53dc6 9using std::vector;
4eb9c745 10
219fd4ba 11string lc(const string& str);
4eb9c745 12
a2970685
MM
13bool is_alpha( int );
14bool is_digit( int );
15bool is_numeric( int );
16bool is_alphanum( int );
17bool is_whitespace( int );
18
f6fc8c0d
JM
19vector<string> split(const char *str, char c = ',');
20vector<float> parse_number_list(const char *str);
21
a699b669
AW
22string remove_non_number( string str );
23
d5d3d675
JM
24uint16_t get_checksum(const string& to_check);
25uint16_t get_checksum(const char* to_check);
4eb9c745 26
d8cff5af 27void get_checksums(uint16_t check_sums[], const string& key);
5efaa1b1 28
4eb9c745
AW
29string shift_parameter( string &parameters );
30
cebe90b6
AW
31string get_arguments( string possible_command );
32
35e773a4 33bool file_exists( const string file_name );
8d857d2e 34
2742fca9 35void system_reset( bool dfu= false );
4eb9c745 36
75f4581c 37string absolute_from_relative( string path );
4eb9c745 38
7800d0b2 39int append_parameters(char *buf, std::vector<std::pair<char,float>> params, size_t bufsize);
4eb9c745
AW
40
41#endif