I have a strings
string='$(0)parameter'
I want to find if '$' is present in the string or not. Can any one tell me how to do that? Using which string functions I can achieve that?

댓글 수: 2

Why is $ special ? It's a normal printable character like 3 or "A" or anything like that so you can use strfind().
hey thanks , strfind worked

댓글을 달려면 로그인하십시오.

 채택된 답변

Sara
Sara 2014년 7월 10일

0 개 추천

If index is empty, $ is not in the string
str='$(0)parameter';
index = strfind(str,'$');

댓글 수: 1

ananth a
ananth a 2019년 11월 27일
if I want to search with '$(0)'. how can i do that?
Because i have to search with {"some name": value, this part.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

질문:

2014년 7월 10일

댓글:

2019년 11월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by