From eec5282c19a206495ffaaf70126986f43acf3421 Mon Sep 17 00:00:00 2001 From: Rick Sellens Date: Wed, 8 Jan 2020 12:05:07 -0500 Subject: [PATCH] Reinsert strStartsWith() needed elsewhere --- Adafruit_GPS.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Adafruit_GPS.cpp b/Adafruit_GPS.cpp index dcc83da..2cf809e 100755 --- a/Adafruit_GPS.cpp +++ b/Adafruit_GPS.cpp @@ -958,3 +958,20 @@ boolean Adafruit_GPS::wakeup(void) { return false; // Returns false if not in standby mode, nothing to wakeup } } + +/**************************************************************************/ +/*! + @brief Checks whether a string starts with a specified prefix + @param str Pointer to a string + @param prefix Pointer to the prefix + @return True if str starts with prefix, false otherwise +*/ +/**************************************************************************/ +static boolean strStartsWith(const char* str, const char* prefix) +{ + while (*prefix) { + if (*prefix++ != *str++) + return false; + } + return true; +} \ No newline at end of file