-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstringfunc.h
35 lines (29 loc) · 1.03 KB
/
stringfunc.h
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
30
31
32
33
34
35
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Hans Liss <[email protected]>
*
* This is based in part on code from IP-login2 from the same author,
* which uses ICMP ping code from Mike Muuss 'ping' program.
*
*/
#ifndef STRINGFUNC_H
#define STRINGFUNC_H
/* Remove junk characters from a string for logging and stuff */
void dejunkifyforlog(char *s);
/*
Remove all blanks at the beginning and end of the string 'string' (in/out).
*/
void cleanupstring(char *string);
/*
Chop off all whitespace characters (including newline characters etc)
from the end of the string 'string' (in/out).
*/
void chop(char *string);
/* Base64 encode/decode */
int b64_encode(unsigned char *indata, int indatalen, char *result, int reslen);
int b64_decode(unsigned char *indata, int indatalen, char *result, int reslen);
#endif