ヘルプ センターヘルプ センター
どの要素が文字であるかを判別
TF = isletter(A)
例
TF = isletter(A) は logical 配列 TF を返します。A が文字配列または string スカラーの場合、TF の要素は、A の対応する要素が文字であれば logical 1 (true) で、それ以外であれば logical 0 (false) です。
A
TF
1
true
0
false
A が文字配列または string スカラーではない場合、isletter は logical 0 (false) を返します。
isletter
すべて折りたたむ
複数の配列を作成し、どの配列要素が文字であるかを判定します。
chr = '123 Main St.'
TF = isletter(chr)
TF = 1x12 logical array 0 0 0 0 1 1 1 1 0 1 1 0
chr を string に変換してテストします。入力引数は文字配列ではないため、isletter は 0 を返します。
chr
str = string(chr)
str = "123 Main St."
TF = isletter(str)
入力配列。スカラー、ベクトル、行列または多次元配列として指定します。A には任意のデータ型を使用できます。
非スカラーの string 配列の要素内にある文字を検索するには、関数 isstrprop を使用します。
isstrprop
使用上の注意事項および制限事項:
char クラスからの入力値は 0 ~ 127 の範囲内でなければなりません。
char
backgroundPool
ThreadPool
R2006a より前に導入
char | ischar | isspace | isstrprop | iscellstr | isnumeric | isa | isstring | string
ischar
isspace
iscellstr
isnumeric
isa
isstring
string
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office