System.SysUtils.TStringHelper.Chars

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

property Chars[Index: Integer]: Char read GetChars;

プロパティ

種類 可視性 ソース ユニット
property public System.SysUtils.pas System.SysUtils TStringHelper

説明

この 0 基準の文字列内の個々の文字へアクセスします。Chars プロパティは読み取り専用です。

 var
   I: Integer;
   MyString: String;
 
 begin
   MyString := 'This is a string.';
 
   for I:= 0 to MyString.Length - 1 do
     Write(MyString.Chars[I]);
 end.

出力は以下のとおりです。

 This is a string.

関連項目