<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>-module(libstr).<BR>-export([exists/2]).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>exists(String,MString)-><BR>    case 
regexp:match(String,"(^" ++ MString ++ "*)") 
of<BR>        
{match,_,_}->true;<BR>        
nomatch->false;<BR>        
{error,Why}->Why<BR>      end.   
</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>=============================================</FONT></DIV>
<DIV><FONT size=2>4> libstr:exists("hello","hel").<BR>true</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>5> libstr:exists("hello","lo").</FONT></DIV>
<DIV><FONT size=2>false</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>6> libstr:exists("hello","lo*").</FONT></DIV>
<DIV><FONT size=2>false</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>7> libstr:exists("hello","*lo").</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV><FONT size=2>
<DIV><BR>Crash dump was written to: erl_crash.dump<BR>eheap_alloc: Cannot 
allocate 1140328500 bytes of memory (of type "heap").</DIV>
<DIV> </DIV>
<DIV>This application has requested the Runtime to terminate it in an unusual 
way.<BR>Please contact the application's support team for more 
information.</FONT></DIV></BODY></HTML>