Skip to content

Instantly share code, notes, and snippets.

@novi
Created May 24, 2011 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save novi/988775 to your computer and use it in GitHub Desktop.
Save novi/988775 to your computer and use it in GitHub Desktop.
object-dummy1
typedef void* StringRef;
StringRef StringCreateWithCString(const char* cstr); // Stringを作成
StringRef StringCreateFromFile(const char* path); // ファイルから作成
int StringGetLength(StringRef str); // 文字列の長さを取得
float StringGetFloat(StringRef str); // 文字列から数値に変換
int StringGetInt(StringRef str);
char StringGetCharAtIndex(StringRef str, int index); // index番目の文字を取得
StringRef StringSubString(StringRef str, int start, int end); // 範囲をしていて文字列を取り出す
StringRef StringGetLowercaseString(StringRef str); // 小文字に変換
StringRef StringConcat(StringRef str1, StringRef str2); // 2つの文字列を連結
void StringWriteToFile(StringRef str, const char* filepath); // ファイルに書き込む
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment