#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lib/types.h"
Go to the source code of this file.
◆ __MOTR_LIB_STRING_H__
#define __MOTR_LIB_STRING_H__ |
◆ m0_asprintf
#define m0_asprintf |
( |
|
s, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value:({ \
int __nr; \
__nr = asprintf(__s, (
fmt), __VA_ARGS__); \
if (__nr <= 0) \
})
char * fmt(const char *format,...) __attribute__((format(printf
static struct m0_addb2_source * s
Definition at line 44 of file string.h.
◆ m0_strcaseeq
#define m0_strcaseeq |
( |
|
a, |
|
|
|
b |
|
) |
| (strcasecmp((a), (b)) == 0) |
◆ m0_strdup
#define m0_strdup |
( |
|
s | ) |
strdup((s)) |
◆ m0_streq
#define m0_streq |
( |
|
a, |
|
|
|
b |
|
) |
| (strcmp((a), (b)) == 0) |
◆ m0_bcount_with_suffix()
const char* m0_bcount_with_suffix |
( |
char * |
buf, |
|
|
size_t |
size, |
|
|
m0_bcount_t |
c |
|
) |
| |
Converts m0_bcount_t number into a reduced string representation, calculating a magnitude and representing it as standard suffix like "Ki", "Mi", "Gi" etc. So, for example, 87654321 becomes "83 Mi".
Definition at line 32 of file string.c.
◆ m0_startswith()
M0_INTERNAL char M0_INTERNAL bool m0_startswith |
( |
const char * |
prefix, |
|
|
const char * |
str |
|
) |
| |
Returns true iff ‘str’ starts with the specified ‘prefix’.
Definition at line 98 of file string.c.
◆ m0_strings_dup()
M0_INTERNAL const char** m0_strings_dup |
( |
const char ** |
src | ) |
|
◆ m0_strings_free()
M0_INTERNAL void m0_strings_free |
( |
const char ** |
arr | ) |
|
◆ m0_vsnprintf()
M0_INTERNAL char* m0_vsnprintf |
( |
char * |
buf, |
|
|
size_t |
buflen, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
◆ M0_XCA_DOMAIN()
◆ s_buf
◆ s_len