[erlang-questions] Find if a substring is present or not

Bengt Kleberg bengt.kleberg@REDACTED
Mon Feb 11 09:31:21 CET 2008


Greetings,

>From the documentation on the string module found at
http://erlang.org/doc/man/string.html

str(String, SubString) -> Index
 rstr(String, SubString) -> Index
 
Types:
String = SubString = string()
 Index = integer()
 
Returns the position where the first/last occurrence of SubString begins
in String. 0 is returned if SubString does not exist in String.



bengt

On Mon, 2008-02-11 at 13:46 +0530, Prabhuram K wrote:
> Hi All,
> I am a newbie and I would like to find if  a substring is present in a
> given string. Any Help would be highly appriciated.
> 
> Thanks,
> ram
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list