as_string_util.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. AngelCode Scripting Library
  3. Copyright (c) 2003-2016 Andreas Jonsson
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any
  6. damages arising from the use of this software.
  7. Permission is granted to anyone to use this software for any
  8. purpose, including commercial applications, and to alter it and
  9. redistribute it freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you
  11. must not claim that you wrote the original software. If you use
  12. this software in a product, an acknowledgment in the product
  13. documentation would be appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and
  15. must not be misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source
  17. distribution.
  18. The original version of this library can be located at:
  19. http://www.angelcode.com/angelscript/
  20. Andreas Jonsson
  21. andreas@angelcode.com
  22. */
  23. #ifndef AS_STRING_UTIL_H
  24. #define AS_STRING_UTIL_H
  25. #include "as_config.h"
  26. BEGIN_AS_NAMESPACE
  27. int asCompareStrings(const char *str1, size_t len1, const char *str2, size_t len2);
  28. double asStringScanDouble(const char *string, size_t *numScanned);
  29. asQWORD asStringScanUInt64(const char *string, int base, size_t *numScanned, bool *overflow);
  30. int asStringEncodeUTF8(unsigned int value, char *outEncodedBuffer);
  31. int asStringDecodeUTF8(const char *encodedBuffer, unsigned int *outLength);
  32. int asStringEncodeUTF16(unsigned int value, char *outEncodedBuffer);
  33. END_AS_NAMESPACE
  34. #endif