1 Star 3 Fork 1

Robot_Steve / LightweightCString

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
LCString.h 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
/* File name: LCString.h
* Last Modified Date: July 11th, 2022
* Author: Robot_Steve
* Description: Header file containing functions in this library.
*/
#include <stdlib.h>
#include <stdio.h>
#ifndef TyString_Header
#define TyString_Header
typedef struct String {
char* stringData;
unsigned int length;
} string;
#ifdef __cplusplus
extern "C" {
#endif
// Initialize String
string initStr();
// Add new char to string
void addChar(string *str, char elem);
// Add new string to string
void addStr(string *str, char *elem);
// Copy a string object
string strCopy(const string *str);
// Get string data
char* getData(const string *str);
// Used to locate a string in the original data to determine its location
int find(const string *Str, char *findStr);
// Replace the specified content in the original string with another string
void replace(string *str, char *elem, char *newelem);
// Clear the contents of the String class
void clearStr(string *str);
// Get string length
int len(string *str);
#ifdef __cplusplus
}
#endif
#endif
C
1
https://gitee.com/robot-steve/LightweightCString.git
git@gitee.com:robot-steve/LightweightCString.git
robot-steve
LightweightCString
LightweightCString
main

搜索帮助