Vector Optimized Library of Kernels  2.5.0
Architecture-tuned implementations of math kernels
string_view.c File Reference
#include "internal/string_view.h"
#include <assert.h>
#include <ctype.h>
#include <string.h>

Functions

int CpuFeatures_StringView_IndexOfChar (const StringView view, char c)
 
int CpuFeatures_StringView_IndexOf (const StringView view, const StringView sub_view)
 
bool CpuFeatures_StringView_IsEquals (const StringView a, const StringView b)
 
bool CpuFeatures_StringView_StartsWith (const StringView a, const StringView b)
 
StringView CpuFeatures_StringView_PopFront (const StringView str_view, size_t count)
 
StringView CpuFeatures_StringView_PopBack (const StringView str_view, size_t count)
 
StringView CpuFeatures_StringView_KeepFront (const StringView str_view, size_t count)
 
char CpuFeatures_StringView_Front (const StringView view)
 
char CpuFeatures_StringView_Back (const StringView view)
 
StringView CpuFeatures_StringView_TrimWhitespace (StringView view)
 
static int HexValue (const char c)
 
static int ParsePositiveNumberWithBase (const StringView view, int base)
 
int CpuFeatures_StringView_ParsePositiveNumber (const StringView view)
 
void CpuFeatures_StringView_CopyString (const StringView src, char *dst, size_t dst_size)
 
bool CpuFeatures_StringView_HasWord (const StringView line, const char *const word_str)
 
bool CpuFeatures_StringView_GetAttributeKeyValue (const StringView line, StringView *key, StringView *value)
 

Function Documentation

◆ CpuFeatures_StringView_Back()

char CpuFeatures_StringView_Back ( const StringView  view)

◆ CpuFeatures_StringView_CopyString()

void CpuFeatures_StringView_CopyString ( const StringView  src,
char *  dst,
size_t  dst_size 
)

◆ CpuFeatures_StringView_Front()

char CpuFeatures_StringView_Front ( const StringView  view)

◆ CpuFeatures_StringView_GetAttributeKeyValue()

bool CpuFeatures_StringView_GetAttributeKeyValue ( const StringView  line,
StringView key,
StringView value 
)

◆ CpuFeatures_StringView_HasWord()

bool CpuFeatures_StringView_HasWord ( const StringView  line,
const char *const  word_str 
)

◆ CpuFeatures_StringView_IndexOf()

int CpuFeatures_StringView_IndexOf ( const StringView  view,
const StringView  sub_view 
)

◆ CpuFeatures_StringView_IndexOfChar()

int CpuFeatures_StringView_IndexOfChar ( const StringView  view,
char  c 
)

◆ CpuFeatures_StringView_IsEquals()

bool CpuFeatures_StringView_IsEquals ( const StringView  a,
const StringView  b 
)

◆ CpuFeatures_StringView_KeepFront()

StringView CpuFeatures_StringView_KeepFront ( const StringView  str_view,
size_t  count 
)

◆ CpuFeatures_StringView_ParsePositiveNumber()

int CpuFeatures_StringView_ParsePositiveNumber ( const StringView  view)

◆ CpuFeatures_StringView_PopBack()

StringView CpuFeatures_StringView_PopBack ( const StringView  str_view,
size_t  count 
)

◆ CpuFeatures_StringView_PopFront()

StringView CpuFeatures_StringView_PopFront ( const StringView  str_view,
size_t  count 
)

◆ CpuFeatures_StringView_StartsWith()

bool CpuFeatures_StringView_StartsWith ( const StringView  a,
const StringView  b 
)

◆ CpuFeatures_StringView_TrimWhitespace()

StringView CpuFeatures_StringView_TrimWhitespace ( StringView  view)

◆ HexValue()

static int HexValue ( const char  c)
static

◆ ParsePositiveNumberWithBase()

static int ParsePositiveNumberWithBase ( const StringView  view,
int  base 
)
static