MCPcopy Create free account
hub / github.com/PowerBroker2/ELMduino / removeChar

Method removeChar

src/ELMduino.cpp:462–471  ·  view source on GitHub ↗

void ELM327::removeChar(char *from, char const *remove) Description: ------------ * Removes all instances of each char in string "remove" from the string "from" Inputs: ------- * char *from - String to remove target(s) from * char const *remove - Chars to find/remove Return: ------- * void */

Source from the content-addressed store, hash-verified

460 * void
461*/
462void ELM327::removeChar(char *from, const char *remove)
463{
464 size_t i = 0, j = 0;
465 while (from[i]) {
466 if (!strchr(remove, from[i]))
467 from[j++] = from[i];
468 i++;
469 }
470 from[j] = '\0';
471}
472/*
473 double ELM327::conditionResponse(const uint8_t &numExpectedBytes, const float &scaleFactor, const float &bias)
474

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected