check for new line in a string
古いコメントを表示
How to check if a new line character exists in a string
2 件のコメント
KSSV
2022 年 1 月 13 日
What string you have? Show us string.
Joshitha Giridhar
2022 年 1 月 13 日
編集済み: Joshitha Giridhar
2022 年 1 月 13 日
回答 (1 件)
Paul
2022 年 1 月 13 日
These functions might help
doc newline
doc contains
1 件のコメント
Example:
c1 = "The quick brown fox";
c2 = "jumped over the lazy dog";
c3 = c1 + newline + c2 % for example
contains([c1;c2;c3],newline)
Check the doc page for newline to see if that's actually character you need to search for. Can also use contains() to search for more than one type of character if needed.
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
