strStartsWith

Tests if a string starts with a specific prefix. Takes str (string to test), prefix (prefix to check for). Returns 1 if str begins with prefix, otherwise returns 0.

String

Parameters & Returns

Parameters

str String
prefix String

Returns

Int

Quick Summary

Tests if a string starts with a specific prefix. Takes str (string to test), prefix (prefix to check for). Returns 1 if str begins with prefix, otherwise returns 0.

Technical Exegesis...

Returns 1 if str begins with prefix, otherwise returns 0. The comparison is case-sensitive.

Returns 0 if prefix is longer than str, or if either parameter is null. Useful for parsing file paths, command parsing, or protocol detection.

Example

Example.bam
; No example implemented yet