1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 
5 #ifndef AMP_UTILS_H
6 #define AMP_UTILS_H
7 
8 #include <stddef.h>
9 #include <stdlib.h>
10 #include <string.h>
11 
12 #if defined(__cplusplus)
13 extern "C" {
14 #endif
15 
16 unsigned char hex2num(unsigned char ch);
17 char itoch(int val);
18 void num2hex(unsigned char ch, unsigned char *hex);
19 int end_with(char *str1, char *str2);
20 void amp_dump(const char *title, const void *buff, const int len);
21 int amp_version_get(char *version);
22 int amp_app_version_get(char *version);
23 
24 #ifdef SUPPORT_NODE_MODELES
25 char *getFilePath(char *name);
26 char *getClearPath(char *path);
27 char *getNodeModulePath(char *path);
28 #endif
29 
30 #if defined(__cplusplus)
31 }
32 #endif
33 
34 #endif /* JSE_UTILS_H */
35