function globallink_starts_with in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 globallink.inc \globallink_starts_with()
- 7.6 globallink.inc \globallink_starts_with()
Determines whether or not a string begins with a certain substring.
Parameters
string $haystack: The haystack.
string $needle: The needle.
Return value
int
See also
strncmp()
2 calls to globallink_starts_with()
- globallink_field in ./
globallink_field_configuration.inc - Renders form for globallink_field.
- globallink_field_submit in ./
globallink_field_configuration.inc - Handles submission of globallink_field form.
File
- ./
globallink.inc, line 918 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_starts_with($haystack, $needle) {
return !strncmp($haystack, $needle, strlen($needle));
}