It looks like you're new here. Sign in or register to get started.
demo:='abc bcd def'.
STRPOS(demo,' ')
Torben_R. wrote: » If you use one more variable it works SubString := ' '; String := 'abc def'; strpos(string,substring)
"Given String" := ' abc def efg'; MESSAGE('---' + "Given String" + '---'); String := DELCHR("Given String",'='); MESSAGE('---' + String + '---'); subString :=' '; pos := STRPOS(String,' '); MESSAGE(FORMAT(pos));
"Given String" := 'abc def efg'; subString :=' '; pos := STRPOS(Given String,subString); MESSAGE(FORMAT(pos));
"Given String" := 'abc def efg'; pos := STRPOS(Given String,' '); MESSAGE(FORMAT(pos));
Answers
SubString := ' ';
String := 'abc def';
strpos(string,substring)
But main problem in my code was I was trimming all the spaces before getting the position by using delchar("Given String",'=')
so later I change code as
OR
Both works for me!
Thanks