public/wordpress/wp-content/plugins/wp-courseware/includes/functions/formatting.php
/**
 * Limit length of an arg.
 *
 * @since 4.3.0
 *
 * @param string  $string The string to limit the length on.
 * @param integer $limit The number of characters to limit by.
 *
 * @return string The modified string.
 */
Limit length of an arg.

@param string  $string The string to limit the length on.
@param integer $limit The number of characters to limit by.

@return string The modified string.
Limit length of an arg . @param string $string The string to limit the length on . @param integer $limit The number of characters to limit by . @return string The modified string .
function wpcw_limit_length( $string, $limit = 127 ) {
	if ( strlen( $string ) > $limit ) {
		$string = substr( $string, 0, $limit - 3 ) . '...';
	}
	return $string;
}
function wpcw_limit_length ( $ string , $ limit = 127 ) { if ( strlen ( $ string ) > $ limit ) { $ string = substr ( $ string , 0 , $ limit - 3 ) . '...' ; } return $ string ; }
Limit length of an arg.
Limit length of an arg .