[Scilab-users] Converting the result of strchr() to a boolean test?
Samuel Gougeon
sgougeon at free.fr
Sat Apr 2 15:28:20 CEST 2016
Hello,
Le 02/04/2016 15:19, scilab.20.browseruk at xoxy.net a écrit :
> I wan't to check a string for the presence of a particular character, which strchr() does perfectly:
>
> -->strchr( 'fred', 'r' )
> ans =
> red
It is not really strchr() 's purpose, rather the grep() one:
if grep('fred','r') ~= []
disp("found")
else
disp("not found")
end
Samuel
More information about the users
mailing list