string.h

来自「一百个病毒的源代码 包括熊猫烧香等 极其具有研究价值」· C头文件 代码 · 共 41 行

H
41
字号
// Larbin// Sebastien Ailleret// 20-12-99 -> 20-12-99#ifndef STRING_HH#define STRING_HH#include "types.h"class String { private:  char *chaine;  uint pos;  uint size; public:  // Constructor  String (uint size=128);  // Destructor  ~String ();  // Recycle this string  void recycle (uint size=256);  // get the char * : it is deleted when you delete this String Object  char *getString ();  // give a char * : it creates a new one : YOU MUST DELETE IT YOURSELF  char *giveString ();  // append a char  void addChar (char c);  // append a char *  void addString (char *s);  // append a buffer  void addBuffer (char *s, uint len);  // length of this string  inline uint getLength () { return pos; };  // get a char of this string  char operator [] (uint i);  // change a char  void setChar (uint i, char c);};#endif // STRING_HH

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?