Yngvarr

Generation

generate functionSun, 19 Feb 2023

get first 5 symbols

function get_first_five_symbols($string) { return substr($string, 0, 5); } get_first_five_symbols('Hello'); // 'Hello' get_first_five_symbols('Hello World'); // 'Hello' get_first_five_symbols('Hello World!'); // 'Hello'

Questions about programming?Chat with your personal AI assistant