X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/8a392978b2d6e7db62cdf6d576e071d70fef9b94..e66ced89a433143539ae398bf21c1e74993db5fa:/Library.cpp diff --git a/Library.cpp b/Library.cpp index e8e70d6..59decd8 100644 --- a/Library.cpp +++ b/Library.cpp @@ -19,14 +19,8 @@ **/ /* }}} */ -#include - #include "cycript.hpp" -#include "Pooling.hpp" - -#include - #include #include #include @@ -34,13 +28,17 @@ #include #include +#include + +#include + +#include "ConvertUTF.h" #include "Driver.hpp" #include "Error.hpp" #include "Execute.hpp" -#include "Parser.hpp" +#include "Pooling.hpp" #include "String.hpp" - -#include "ConvertUTF.h" +#include "Syntax.hpp" template <> ::pthread_key_t CYLocal::key_ = Key_(); @@ -215,6 +213,10 @@ double CYCastDouble(const char *value) { return CYCastDouble(value, strlen(value)); } +_visible bool CYStartsWith(const CYUTF8String &haystack, const CYUTF8String &needle) { + return haystack.size >= needle.size && strncmp(haystack.data, needle.data, needle.size) == 0; +} + CYUTF8String CYPoolCode(CYPool &pool, std::istream &stream) { CYLocalPool local; CYDriver driver(local, stream);