WC_Product_CSV_Importer::starts_with()protectedWC 1.0

Check if strings starts with determined word.

Method of the class: WC_Product_CSV_Importer{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->starts_with( $haystack, $needle );
$haystack(string) (required)
Complete sentence.
$needle(string) (required)
Excerpt.

WC_Product_CSV_Importer::starts_with() code WC 8.7.0

protected function starts_with( $haystack, $needle ) {
	return substr( $haystack, 0, strlen( $needle ) ) === $needle;
}