mlreportgen.utils.normalizeString
テキストから余分なスペースと改行を削除
説明
例
string 配列と文字ベクトルの正規化
import mlreportgen.utils.* str = " a sample string " n_strchar = normalizeString(str)
str = " a sample string " n_strchar = "a sample string"
import mlreportgen.utils.* char_vec = ' a sample character vector' char_vec1 = [char_vec newline ' plus a new line '] n_strchar = normalizeString(char_vec1)
char_vec = ' a sample character vector ' char_vec1 = ' a sample character vector plus a new line ' n_strchar = 'a sample character vector plus a new line'
入力引数
strchar
— 正規化するテキスト
文字ベクトル | string 配列
正規化するテキスト。文字ベクトルまたは string 配列として指定します。
出力引数
n_strchar
— 正規化されたテキスト
文字ベクトル | string 配列
正規化されたテキスト。入力した型に応じて文字ベクトルまたは string 配列として返されます。
バージョン履歴
R2018b で導入
MATLAB コマンド
次の 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:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)