Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:root:tstring [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:root:tstring

以前のリビジョンの文書です



Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/handler.php on line 1458

Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line 79

Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line 101

Warning: preg_match(): Compilation failed: invalid range in character class at offset 3120 in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/lexer.php on line 118
A PCRE internal error occured. This might be caused by a faulty plugin

====== TString ====== ---- ===== TString型の変数に文字を入れる ===== * やり方色々 <code c_mac> TString str("hoge"); //ありがち TString str = "hoge"; //こちらもありがち TString str; //まず宣言してから str.Form("hoge"); //Form関数を使って値を入れる </code> * TString文字列は配列として入っている(というか char* )。この例だと * s1[0] ーー> h * s1[1] ーー> o * s1[2] ーー> g * s1[3] ーー> e * 32-bit なら11文字以下、64-bit なら15文字以下? * str(0,2) 等で文字列の0番目から2番目(1文字目〜3文字目)を取り出せる。 * TString s("hello world") の様に空白もOK * 文字列を使うときは以下のようにする。 <code c_mac> cout << str << endl; cout << str.Data() << endl; </code> * 上の2つの出力は同じ(hoge)。Data関数の意味は?よくわからん ---- ===== Form ===== ---- ===== その他関数など色々 ===== <code c_mac> str += "huge";//strの最後に”huge”を足すー>str = hogehuge str.First("g");//最初にでてきた ” ” で指定された文字の場所(配列番号)を返す。今回の場合、 2 を返す。 //文字でなく文字列を指定した場合、その先頭の str.Insert(str.First("g"),"u");//最初にでてきた”g”の直前に”u”が挿入されるー>str = hougehuge str.ReplaceAll("houge","hoge");//"hougehuge"を"hoge"に置き換えるー>str = hogehage </code> ----

ja/root/tstring.1397176341.txt.gz · 最終更新: 2014/04/11 00:32 by kota