String.startsWith()
Signature
boolean startsWith (String s1, String prefix)
Domain
action, condition, query
Description
Tests if the String s1
starts with the specified prefix.
Parameters
Name | Type | Description |
s1 | String | A String to test for the presence of the prefix. |
prefix | String | A prefix String to test for in the String s1 . |
Returns
Type | Description |
boolean | true if s1 starts with prefix , false otherwise. |
Example
boolean result = String.startsWith ("This is a test", "test");
Result is:
result contains: false.