ACDC Senior Project v1.0.0
Senior Project for Textron Aviation
Loading...
Searching...
No Matches
ACDC_string.h
Go to the documentation of this file.
1
11#ifndef __ACDC_STRING_H
12#define __ACDC_STRING_H
13
14#include "ACDC_stdbool.h"
15#include "ACDC_stdint.h"
16
21char* StringCopy(char* dest, const char* source);
22
30int32_t StringCompare(const char *str1, const char *str2);
31
35int32_t StringLength(const char *str);
36
41char* StringConcat(char *dest, const char *source);
42
47int32_t StringIndexOf(const char *str, char c);
48
53char* StringSubstring(char *str, int32_t index);
54
59bool StringStartsWith(char *str, const char *compareWith);
60
65bool StringEndsWith(const char *str, const char* compareWith);
66
70char* StringToUpper(char* str);
71
75char* StringToLower(char* str);
76
80bool StringIsUpper(const char* str);
81
85bool StringIsLower(const char* str);
86
90bool StringIsNumeric(const char* str);
91
95bool StringIsAlphabetic(const char* str);
96
100bool StringIsAlphanumeric(const char* str);
101
105char *StringConvert(int32_t num);
106
107#endif
Header file for the type bool.
Header file for intx_t and uintx_t types.
signed long int int32_t
Definition ACDC_stdint.h:21
int32_t StringIndexOf(const char *str, char c)
Finds and returns the index of first occurance the character c in the string str.
Definition ACDC_string.c:62
char * StringConvert(int32_t num)
Converts an int32_t into a string.
Definition ACDC_string.c:185
bool StringIsAlphabetic(const char *str)
Checks if all characters in the input string are alphabetic.
Definition ACDC_string.c:156
char * StringCopy(char *dest, const char *source)
Copies the string pointed by source (including the null character) to the destination dest.
Definition ACDC_string.c:20
char * StringConcat(char *dest, const char *source)
Appends the content of the string source to the end of the string dest.
Definition ACDC_string.c:51
char * StringToLower(char *str)
Converts all uppercase characters A-Z in the string str to lowercase.
Definition ACDC_string.c:103
char * StringToUpper(char *str)
Converts all lowercase characters a-z in the string str to uppercase.
Definition ACDC_string.c:92
bool StringIsAlphanumeric(const char *str)
Checks if all characters in the input string are alphanumeric.
Definition ACDC_string.c:170
bool StringIsLower(const char *str)
Checks if all characters in the input string are lowercase characters (can only contain characters)
Definition ACDC_string.c:128
int32_t StringLength(const char *str)
Calculates the length of the string str.
Definition ACDC_string.c:45
bool StringIsUpper(const char *str)
Checks if all characters in the input string are uppercase characters (can only contain characters)
Definition ACDC_string.c:114
bool StringIsNumeric(const char *str)
Checks if all characters in the input string are numeric.
Definition ACDC_string.c:142
char * StringSubstring(char *str, int32_t index)
Returns a substring of the input string str starting from the specified index.
Definition ACDC_string.c:70
bool StringEndsWith(const char *str, const char *compareWith)
Checks if the given string str ends with the specified substring compareWith.
Definition ACDC_string.c:82
int32_t StringCompare(const char *str1, const char *str2)
Compares two strings character by character. Returns 0 if the strings are equal, >0 if the first non-...
Definition ACDC_string.c:31
bool StringStartsWith(char *str, const char *compareWith)
Checks if the given string str starts with the specified substring compareWith.
Definition ACDC_string.c:74