s= strrep(origStr, oldSubstr, newSubstr)
str1==strrep(str,'sport','1'); str2==strrep(str1,'art','2'); str3==strrep(str2,'art_u','3'); should be 3 but when print it became 2_u it's errorwhat is the error ? and how to use if condition with strrep to specify any word for replacing?? if u have more replacing ? art=2 , and when 'art_u' it's one word it will be 2_u it is error the output art=2 so to be art_u= 2_u is wrong should be 3 only how to solve ???
Best Answer