DragonOS/user/libs/libc/string.h
fslongjin 37669ebf87 🆕 cd命令
2022-05-25 22:50:32 +08:00

40 lines
829 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <libc/sys/types.h>
void *memset(void *dst, unsigned char C, uint64_t size);
/**
* @brief 获取字符串的大小
*
* @param s 字符串
* @return size_t 大小
*/
size_t strlen(const char *s);
/*
比较字符串 FirstPart and SecondPart
FirstPart = SecondPart => 0
FirstPart > SecondPart => 1
FirstPart < SecondPart => -1
*/
int strcmp(const char *FirstPart, const char *SecondPart);
/**
* @brief 拷贝指定字节数的字符串
*
* @param dst 目标地址
* @param src 源字符串
* @param Count 字节数
* @return char*
*/
char *strncpy(char *dst, char *src, long Count);
/**
* @brief 拼接两个字符串将src接到dest末尾
*
* @param dest 目标串
* @param src 源串
* @return char*
*/
char *strcat(char *dest, const char *src);