Functions
include/grpc/support/string_util.h File Reference
#include <grpc/support/port_platform.h>
#include <grpc/impl/codegen/gpr_types.h>
Include dependency graph for include/grpc/support/string_util.h:

Go to the source code of this file.

Functions

GPRAPI int gpr_asprintf (char **strp, const char *format,...) GPR_PRINT_FORMAT_CHECK(2
 
GPRAPI char * gpr_strdup (const char *src)
 

Function Documentation

◆ gpr_asprintf()

GPRAPI int gpr_asprintf ( char **  strp,
const char *  format,
  ... 
)

printf to a newly-allocated string. The set of supported formats may vary between platforms.

On success, returns the number of bytes printed (excluding the final '\0'), and *strp points to a string which must later be destroyed with gpr_free().

On error, returns -1 and sets *strp to NULL. If the format string is bad, the result is undefined.

◆ gpr_strdup()

GPRAPI char* gpr_strdup ( const char *  src)

String utility functions Returns a copy of src that can be passed to gpr_free(). If allocation fails or if src is NULL, returns NULL.

Definition at line 39 of file string.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:32