mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-12-26 18:12:34 +08:00
Added new support str function
This commit is contained in:
parent
d458a4ec2e
commit
b80d683ce6
2 changed files with 4 additions and 0 deletions
|
@ -817,6 +817,9 @@ extern void str_lower(char *s ){
|
|||
for(int i=0; i < strlen(s); i++)
|
||||
s[i] = tolower( s[i] );
|
||||
}
|
||||
extern bool str_startswith(const char *s, const char *pre) {
|
||||
return strncmp(pre, s, strlen(pre)) == 0;
|
||||
}
|
||||
|
||||
// Replace unprintable characters with a dot in char buffer
|
||||
extern void clean_ascii(unsigned char *buf, size_t len) {
|
||||
|
|
|
@ -247,6 +247,7 @@ extern uint64_t HornerScheme(uint64_t num, uint64_t divider, uint64_t factor);
|
|||
extern int num_CPUs(void); // number of logical CPUs
|
||||
|
||||
extern void str_lower(char* s); // converts string to lower case
|
||||
extern bool str_startswith(const char *s, const char *pre); // check for prefix in string
|
||||
extern void strcleanrn(char *buf, size_t len);
|
||||
extern void strcreplace(char *buf, size_t len, char from, char to);
|
||||
extern char *strmcopy(char *buf);
|
||||
|
|
Loading…
Reference in a new issue