php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
fpm_str.h
Go to the documentation of this file.
1 /* (c) 2007,2008 Andrei Nigmatulin */
2
3#ifndef FPM_STR_H
4#define FPM_STR_H 1
5
6static inline char *str_purify_filename(char *dst, char *src, size_t size) /* {{{ */
7{
8 char *d, *end;
9
10 d = dst;
11 end = dst + size - 1;
12
13 for (; d < end && *src; ++d, ++src) {
14 if (* (unsigned char *) src < ' ' || * (unsigned char *) src > '\x7f') {
15 *d = '.';
16 } else {
17 *d = *src;
18 }
19 }
20
21 *d = '\0';
22
23 return d;
24}
25/* }}} */
26
27#endif
new_type size
Definition ffi.c:4365
unsigned const char * end
Definition php_ffi.h:51