The str_replace() function is used to replace some case-sensitive characters in a string. This function was introduced in PHP3. The str_replace() function replaces parts of a string with new parts you specify and takes a minimum of three parameters: what to look for, what to replace it with, and the string to work with. If […]
Archives for April 2022
PHP function str_repeat() – Repeat a string
The str_repeat() function is used to repeat a string, a specified number of times. This function was introduced in PHP4. The function returns a string consisting of count copies of string appended to each other. If the count is not greater than 0, an empty string is returned. Syntax: str_repeat(string $string, int $times): string Parameters […]
Invalid ABI Option abi=aapcs-linux
In case you are trying to cross compile linux for arm and your make gives you the error: Invalid ABI Option abi=aapcs-linux This is because you have an old cross-compilation tool chain. aapcs stands for Procedure Call Standard for the Arm Architecture. There are 2 solutions to tackle this problem as explained below. Solutions: 1. […]
PHP function str_ireplace() – Case-insensitive version of str_replace()
The str_ireplace() function is used to replace some case insensitive characters in a string. This function was introduced in PHP5. Performs a case-insensitive search for all occurrences of search in string and replaces them with replace. If all three parameters are strings, a string is returned. If string is an array, the replacement is performed […]
PHP function convert_cyr_string() – Convert from one Cyrillic character set to another
The convert_cyr_string() function is used to convert a string from one Cyrillic character-set to another set. It was introduced in PHP3. The character sets to be converted are specified with a single character code. Look at the types that are supported by this function: “k – koi8-r “w – windows-1251 “i – iso8859-5 “a – […]
PHP function chunk_split() – Split a string into smaller chunks
The chunk_split() function divides a string into a sequence of small fragments. chunk_split() adds the character(s) specified in chunk_ending every chunk_length characters. This function is useful for breaking certain types of data into separate lines of a specified length. It’s often used to make base64 encoded data conform to RFC 2045. This function was introduced […]
PHP function chr() – Generate a single-byte string from a number
The chr() function returns a single character string from an ASCII value that is already specified. If the integer provided is not a valid ASCII code, the function returns nothing. This function was introduced in PHP3. Note that the integer can be specified in octal or hex values, as well as decimal. Octal values are […]
PHP function chop() – Alias of rtrim()
The chop() function is the pseudonym of rtrim(). This function was introduced in PHP3. chop() removes all trailing whitespace characters from the given string. These characters include the horizontal tab (\t), linefeed (\n), vertical tab (\013), carriage return (\r), and space (‘ ”) characters. Syntax: string chop(string string) Return Values String stripped of trailing whitespace […]
PHP function bin2hex – Convert binary data into hexadecimal representation
The bin2hex() function converts a string of ASCII characters to hexadecimal values. This was introduced in PHP3. This function Converts binary to a hexadecimal (base-16) value. Up to a 32-bit number, or 2,147,483,647 decimal, can be converted. Note that any value passed to the function is converted to an ASCII string (if possible). The string […]
hdiutil Command Examples in Mac
hdiutil works with disk images, such as ISO or DMG files downloaded from the Internet. You can mount, unmount, create, resize, verify, and even burn images onto discs. To mount an ISO file mydisk.iso as a volume and access its contents, run: # hdiutil attach mydisk.iso # ls /Volumes MyDisk hdiutil Command Examples 1. Creating […]