WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
string_view.h File Reference
#include <string.h>
#include "upb/port/def.inc"
#include "upb/port/undef.inc"

Go to the source code of this file.

Classes

struct  upb_StringView
 

Macros

#define UPB_STRINGVIEW_INIT(ptr, len)
 
#define UPB_STRINGVIEW_FORMAT   "%.*s"
 
#define UPB_STRINGVIEW_ARGS(view)
 

Functions

UPB_API_INLINE upb_StringView upb_StringView_FromDataAndSize (const char *data, size_t size)
 
UPB_INLINE upb_StringView upb_StringView_FromString (const char *data)
 
UPB_INLINE bool upb_StringView_IsEqual (upb_StringView a, upb_StringView b)
 
UPB_INLINE int upb_StringView_Compare (upb_StringView a, upb_StringView b)
 

Macro Definition Documentation

◆ UPB_STRINGVIEW_ARGS

#define UPB_STRINGVIEW_ARGS ( view)
Value:
(int)(view).size, (view).data

◆ UPB_STRINGVIEW_FORMAT

#define UPB_STRINGVIEW_FORMAT   "%.*s"

◆ UPB_STRINGVIEW_INIT

#define UPB_STRINGVIEW_INIT ( ptr,
len )
Value:
{ ptr, len }
auto ptr(T p) -> const void *
Converts p to const void* for pointer formatting.
Definition format.h:3963

Function Documentation

◆ upb_StringView_Compare()

UPB_INLINE int upb_StringView_Compare ( upb_StringView a,
upb_StringView b )

◆ upb_StringView_FromDataAndSize()

UPB_API_INLINE upb_StringView upb_StringView_FromDataAndSize ( const char * data,
size_t size )

◆ upb_StringView_FromString()

UPB_INLINE upb_StringView upb_StringView_FromString ( const char * data)

◆ upb_StringView_IsEqual()

UPB_INLINE bool upb_StringView_IsEqual ( upb_StringView a,
upb_StringView b )