Difference between revisions of "SHIP:Sail:search"

From Serious Documentation
Jump to: navigation, search
Line 22: Line 22:
 
|-
 
|-
 
! scope="col" style="text-align:left" | Return
 
! scope="col" style="text-align:left" | Return
! scope="col" style="text-align:left" | {{DataType|Boolen}}
+
! scope="col" style="text-align:left" | {{DataType|Boolean}}
 
! scope="col" style="text-align:left" | depending on if tgt is found in src or not.
 
! scope="col" style="text-align:left" | depending on if tgt is found in src or not.
 
|}
 
|}

Revision as of 17:08, 24 October 2016

Function Returns Introduced Description
search Boolean v5.1.0 Returns true or false depending if the target string is found within the source string or not.

See Also:

Prototype

Boolean search(String src,String tgt);

Parameters/Return Value

Parameter Data Type Description
src String String to search in
tgt String String to find in original
Return Boolean depending on if tgt is found in src or not.

Detailed Description

The search function returns true if target string is found in source string and false if target is not found in source string..

Examples

Example Result Notes
search("hello my name is","ll"); true
search("hello my name is","myname"); false