MCPcopy Create free account
hub / github.com/apache/singa / SkipComma

Function SkipComma

test/gtest/gtest.h:7502–7509  ·  view source on GitHub ↗

Skips to the first non-space char after the first comma in 'str'; returns NULL if no comma is found in 'str'.

Source from the content-addressed store, hash-verified

7500// Skips to the first non-space char after the first comma in 'str';
7501// returns NULL if no comma is found in 'str'.
7502inline const char* SkipComma(const char* str) {
7503 const char* comma = strchr(str, ',');
7504 if (comma == NULL) {
7505 return NULL;
7506 }
7507 while (IsSpace(*(++comma))) {}
7508 return comma;
7509}
7510
7511// Returns the prefix of 'str' before the first comma in it; returns
7512// the entire string if it contains no comma.

Callers 2

RegisterMethod · 0.85

Calls 1

IsSpaceFunction · 0.85

Tested by

no test coverage detected