Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
15
Task/String-matching/PureBasic/string-matching-1.purebasic
Normal file
15
Task/String-matching/PureBasic/string-matching-1.purebasic
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Procedure StartsWith(String1$, String2$)
|
||||
Protected Result
|
||||
If FindString(String1$, String2$, 1) =1 ; E.g Found in possition 1
|
||||
Result =CountString(String1$, String2$)
|
||||
EndIf
|
||||
ProcedureReturn Result
|
||||
EndProcedure
|
||||
|
||||
Procedure EndsWith(String1$, String2$)
|
||||
Protected Result, dl=Len(String1$)-Len(String2$)
|
||||
If dl>=0 And Right(String1$, Len(String2$))=String2$
|
||||
Result =CountString(String1$, String2$)
|
||||
EndIf
|
||||
ProcedureReturn Result
|
||||
EndProcedure
|
||||
Loading…
Add table
Add a link
Reference in a new issue