F.37. Strings
Function | Returns | Description |
---|---|---|
crc32(string str) | string | Calculates the crc32 polynomial of a string. |
crypt(string str [, string salt]) | string | Encrypts a string. |
convert_cyr_string(string str, string from, string to) | string | Converts from one Cyrillic character set to another. |
lcg_value() | float | Returns a value from the combined linear congruential generator. |
levenshtein(string str1, string str2) | int | Calculates Levenshtein distance between two strings. |
md5(string str, [ bool raw_output]) | string | Calculates the md5 hash of a string. |
md5_file(string filename [, bool raw_output]) | string | Calculates the md5 hash of given filename. |
metaphone(string text, int phones) | string | Breaks English phrases down into their phonemes. |
pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]]) | string | Takes one or more arguments and packs them into a binary string according to the format argument. |
unpack(string format, string input) | array | Unpacks binary string into named array elements according to format argument. |
sha1(string str [, bool raw_output]) | string | Calculates the sha1 hash of a string. |
sha1_file(string filename [, bool raw_output]) | string | Calculates the sha1 hash of given filename. |
soundex(string str) | string | Calculates the soundex key of a string. |
bin2hex(string data) | string | Converts the binary representation of data to hex. |
strspn(string str, string mask [, start [, len]]) | int | Finds length of initial segment consisting entirely of characters found in mask. If start and/or length is provided, works ... |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.