Hutmacher Common Library -- Version 0.1
|
Functions | |
function | hcl_features_ () |
function | hcl_feature_ ($hcl_feature) |
function | array_key_exists_ ($array, $key, $recurse) |
Determines is a given key exists in a given array. More... | |
function | array_length_ ($array, $recurse) |
Returns the number of elements in the given array. More... | |
function | array_occurrence_count_ ($array, $values, $recurse) |
Counts the number of times a value occurs in an array. More... | |
function | array_remove_values_ ($array, $values, $recurse) |
Returns an array with all the given values removed. More... | |
function | array_value_ ($array, $key, $fallback, $recurse, $error_value) |
Returns a value from an array by the given key, or a fallback value if the key doesn't exist. More... | |
function | array_value_exists_ ($array, $value, $recurse) |
Checks to see if an array contains the given value. More... | |
function | get_type_ ($value, $flags) |
function | is_alphabetic_string_ ($value) |
Determines if a given string contains ONLY characters within the alphabet (ie a-z and A-Z) More... | |
function | is_alphanumeric_string_ ($value) |
Determines if a given string contains ONLY characters within the alphabet or numberic digits (ie a-z and A-Z and 0-9) More... | |
function | is_array_ ($value) |
Determines if a given variable is an array. More... | |
function | is_base_64_string_ ($value) |
Determines if a variable is a base_64 encoded string. More... | |
function | is_boolean_ ($value) |
Determines if a variable is a boolean value. More... | |
function | is_boolean_string_ ($value, $terms, $case_sensitive) |
Determines if a variable is a string containing certain values to indicate true or false. More... | |
function | is_defined_ ($value) |
Determines if a variable has been defined. More... | |
function | is_digit_string_ ($value) |
Determines if a variable is a string that contains ONLY digits (ie 0,1,2,3,4,5,6,7,8 or 9). More... | |
function | is_empty_string_ ($value) |
Determines if a variable is a string that has no characters (ie ""). More... | |
function | is_email_string_ ($value) |
Determines if a variable is a string that contains a valid email address. More... | |
function | is_float_ ($value) |
Determines if a variable is a float. More... | |
function | is_float_string_ ($value) |
Determines if a variable is a string that contains an float value. More... | |
function | is_function_name_ ($value) |
Determines if the given string is the name of a defined function. More... | |
function | is_hexidecimal_string_ ($value) |
Determines if a variable is a string containing only hexidecimal values. More... | |
function | is_integer_ ($value) |
Determines if a variable is an integer. More... | |
function | is_integer_string_ ($value) |
Determines if a variable is a string that contains an integer value. More... | |
function | is_ip_v4_string_ ($value) |
Determines if a variable is a string that contains a valid IPv4 string. More... | |
function | is_ip_v6_string_ ($value) |
Determines if a variable is a string that contains a valid IPv6 string. More... | |
function | is_json_string_ ($value) |
Determines if a variable is a string that contains a valid json string. More... | |
function | is_md5_string_ ($value) |
Determines if a variable is the proper format for an md5 hash string. More... | |
function | is_null_ ($value) |
Determines if a variable is null. More... | |
function | is_numeric_ ($value) |
Determines if a variable is either an integer or a float. More... | |
function | is_numeric_string_ ($value) |
Determines if a variable is a string that contains an integer value or a float value. More... | |
function | is_object_ ($value) |
Determines if a variable is an object. More... | |
function | is_string_ ($value) |
Determines if a variable is a string. More... | |
function | is_social_security_number_string_ ($value) |
Determines if a variable is a string that contains a social security number. More... | |
function | is_zip_code_string_ ($value) |
Determines if a variable is a string that contains a zip code. More... | |
function | is_validated_zip_code_ ($value) |
Determines if $value is listed in the HCL_DATA_ZIP_CODE data files. If so it is a confirmed existing zip code, not just a 5 digit integer. More... | |
function | absolute_ ($value, $precision) |
Returns the positive value of a numeric variable. More... | |
function | ceiling_ ($value) |
Returns the highest integer value to the given variable. More... | |
function | convert_units_ ($data, $value, $from_unit, $to_unit, $precision) |
Converts a value from one unit to another. More... | |
function | cube_ ($value, $precision) |
Returns the value of value to the 3rd power with the given precision. More... | |
function | cube_root_ ($value, $precision) |
Returns the cube root value of value with the given precision. More... | |
function | float_to_string_ ($value, $precision) |
Returns the given float value as a string value. More... | |
function | floor_ ($value) |
Returns the lowest integer value to the given variable. More... | |
function | in_range_ ($value, $minimum, $maximum) |
Checks if a given numeric value is between a minimum and maximum value, inclusive. More... | |
function | in_range_value_ ($value, $minimum, $maximum) |
Returns a number that is within the minimum and maximum values given. More... | |
function | integer_to_string_ ($value) |
Returns the given integer value as a string value. More... | |
function | is_even_ ($value) |
Determif a given variable is even. More... | |
function | is_negative_ ($value) |
Determines if a variable is a negative numeric value. More... | |
function | is_negative_float_ ($value) |
Determines if a variable is a negative float value. More... | |
function | is_negative_integer_ ($value) |
Determines if a variable is a negative float value. More... | |
function | is_odd_ ($value) |
Determines if a given variable is odd. More... | |
function | is_positive_ ($value) |
Determines if a variable is a positive numeric value. More... | |
function | is_positive_float_ ($value) |
Determines if a variable is a positive float value. More... | |
function | is_positive_integer_ ($value) |
Determines if a variable is a positive integer value. More... | |
function | maximum_ ($values) |
Returns the largest numeric value in an array. More... | |
function | mean_ ($values, $precision) |
Returns the average (mean) value of an array of numeric values. More... | |
function | minimum_ ($values) |
Returns the smallest numeric value (integer or float) in an array. More... | |
function | negate_ ($value) |
Returns the negative value of the given value. More... | |
function | pi_ () |
Returns the value of pi. More... | |
function | power_ ($base, $exponent, $precision) |
Returns the value base to the exponent power. More... | |
function | random_ ($minimum, $maximum) |
Returns a random integer between minimum and maximum. More... | |
function | random_float_ ($minimum, $maximum, $precision) |
Returns a integer between $minimum and $maximum. More... | |
function | random_integer_ ($minimum, $maximum) |
Returns a random integer between $minimum and $maximum. More... | |
function | round_ ($value, $precision) |
Returns a numeric value that is rounded to the given precision. More... | |
function | square_ ($value, $precision) |
Returns the given value raised to the second power and truncated to the given precision. More... | |
function | square_root_ ($value, $precision) |
Returns the square root of the given value truncated to the given precision. More... | |
function | sum_ ($values, $precision, $recurse) |
Returns the sum of the numeric values in an array or comma seperated string. More... | |
function | truncate_float_ ($value, $precision) |
Returns a value as a float which has been trucated to the given precision. More... | |
function | base64_to_string_ ($value) |
Converts a base64 encoded string to ascii string. More... | |
function | camel_case_ ($value, $exceptions) |
Returns a string which has all first characters in a word capatilized and the rest of the world lower case. More... | |
function | lower_case_ ($value) |
Returns a string in which all characters have been converted to lower case. More... | |
function | md5_ ($value, $lower_case) |
Returns a string containing an md5 hash of the input string. More... | |
function | password_strength_ ($password, $minimum_length) |
Calculates the bits of entropy for a given password. More... | |
function | string_begins_with_ ($value, $substring, $case_sensitive) |
Checks if a string begins with a given substring. More... | |
function | string_contains_ ($value, $substring, $case_sensitive) |
Checks if a string contains a given substring. More... | |
function | string_ends_with_ ($value, $substring, $case_sensitive) |
Checks if a string ends with a given substring. More... | |
function | string_everything_after_ ($value, $substring, $case_sensitive) |
Returns everything after the first occurance of the given substring. More... | |
function | string_everything_before_ ($value, $substring, $case_sensitive) |
Returns everything before the first occurance of the given substring. More... | |
function | string_everything_between_ ($value, $first_string, $second_string, $case_sensitive) |
Returns everything between the first occurance of $first_string and the first occurance of $second_string. More... | |
function | string_index_valid_ ($value, $index) |
Checks if a given $index is inside the bounds of $value. More... | |
function | string_length_ ($value) |
Returns the length of a given string. More... | |
function | string_longest_line_ ($value) |
Returns the longest string in an array or string that is seperated by end lines. More... | |
function | string_longest_line_index_ ($value) |
Returns the index of the longest string in an array or string that is seperated by end lines. More... | |
function | string_longest_line_length_ ($value) |
Returns the length of the longest string in an array or string that is seperated by end lines. More... | |
function | string_occurance_count_ ($value, $substring, $case_sensitive) |
Returns the number of times a substring or substring(s) occur within an array or string. More... | |
function | string_index_ ($value, $substring, $case_sensitive) |
Returns the index of the first occurance of substring within a string. More... | |
function | string_position_ ($value, $substring, $case_sensitive) |
function | string_replace_ ($value, $search, $replacement, $case_sensitive) |
Returns the given string with all instances of search replaced by replacement. More... | |
function | string_reversed_ ($value) |
Returns the given string in reversed order. More... | |
function | string_to_base64_ ($value) |
Returns the given string converted to base 64. More... | |
function | string_to_integer_ ($value) |
function | string_to_float_ ($value) |
function | string_truncate_ ($value, $length, $append) |
Returns the given string reduced to the given length. More... | |
function | string_validate_characters_allowed_ ($value, $characters, $case_sensitive) |
Checks if the given string contains ONLY the allowed characters supplied. More... | |
function | string_validate_characters_forbidden_ ($value, $characters, $case_sensitive) |
Checks to see if the string is valid (ie does not contain any forbidden characters) More... | |
function | substring_by_length_ ($value, $start, $length) |
Returns a portion of a string. More... | |
function | substring_by_position_ ($value, $start, $end) |
Returns a portion of a string. More... | |
function | trim_ ($value) |
Returns a string in which all white space at the beginning of the string and end of the string has been removed. More... | |
function | trim_left_ ($value) |
Returns a string in which all white space at the beginning of the string has been removed. More... | |
function | trim_right_ ($value) |
Returns a string in which all white space at the end of the string has been removed. More... | |
function | upper_case_ ($value) |
Returns a string in which all characters have been converted to upper case. More... | |
function | get_timestamps_ () |
Returns an array of timestamp values in second, millisecond and microsecond precision. More... | |
function | get_timestamp_ ($format, $timestamp_precision) |
Returns a timestamp in the given format and precision. More... | |
function | array_to_json_ ($array) |
Returns a json string created from the given array. More... | |
function | array_to_string_ ($value, $delimiter) |
function | json_to_array_ ($json) |
function | json_to_object_ ($json) |
function | string_to_array_ ($value, $delimiter) |
function | get_available_data_array_ () |
function | get_available_data_defines_ () |
function | get_data_value_ ($data_source, $key) |
function | get_user_agent_string_ () |
Returns the browsers User Agent string. More... | |
function | get_user_agent_data_array_ () |
Returns an array with details about the browser that has been parsed from the User Agent string. The array indexes are generated from the HCL_CORE_USER_AGENT_xxx defines. More... | |
function | get_user_agent_browser_name_ () |
Returns a string with name of the browser as parsed from the User Agent string. More... | |
function | get_user_agent_browser_version_ () |
Returns a string with version of the browser as parsed from the User Agent string. More... | |
function | get_user_agent_device_model_ () |
Returns a string with name of the device's model as parsed from the User Agent string. More... | |
function | get_user_agent_device_type_ () |
Returns a string with type of device as parsed from the User Agent string. More... | |
function | get_user_agent_device_vendor_ () |
Returns a string with name of the device's vendor as parsed from the User Agent string. More... | |
function | get_user_agent_engine_name_ () |
Returns a string with name of the browser's engine as parsed from the User Agent string. More... | |
function | get_user_agent_engine_version_ () |
Returns a string with version of the browser's engine as parsed from the User Agent string. More... | |
function | get_user_agent_os_name_ () |
Returns a string with name of the browser's operating system as parsed from the User Agent string. More... | |
function | get_user_agent_os_version_ () |
Returns a string with the version of the browser's operating system as parsed from the User Agent string. More... | |
function | get_user_agent_cpu_architecture_ () |
Returns a string with architecture of the browser's operating system as parsed from the User Agent string. More... | |
Hootsoft Common Library For Javascript 0.1
function absolute_ | ( | $value, | |
$precision | |||
) |
Returns the positive value of a numeric variable.
$value | The value to be checked. |
$precision | The number of decimal points to include in the return value. |
function array_key_exists_ | ( | $array, | |
$key, | |||
$recurse | |||
) |
Determines is a given key exists in a given array.
$array | The array to search |
$key | The key to search for |
$recurse | Determines if the function should check each array within the array as well |
function array_length_ | ( | $array, | |
$recurse | |||
) |
Returns the number of elements in the given array.
$array | The array to check. |
$recurse | Determines if the function should check each array within the array as well. |
function array_occurrence_count_ | ( | $array, | |
$values, | |||
$recurse | |||
) |
Counts the number of times a value occurs in an array.
$array | The array or object to search |
$values | The value to search for |
$recurse | Determines if the function should check each array within the array as well. |
Change so values can be a single value.
Make case sensitive
function array_remove_values_ | ( | $array, | |
$values, | |||
$recurse | |||
) |
Returns an array with all the given values removed.
$array | The array or object to search |
$values | The values to search for |
$recurse | check each array or object within the array or object as well |
function array_to_json_ | ( | $array | ) |
Returns a json string created from the given array.
function array_to_string_ | ( | $value, | |
$delimiter | |||
) |
function array_value_ | ( | $array, | |
$key, | |||
$fallback, | |||
$recurse, | |||
$error_value | |||
) |
Returns a value from an array by the given key, or a fallback value if the key doesn't exist.
$array | The array or object to search |
$key | The key to search for |
$fallback | The fallback value to return if the given key cannot be found. |
$recurse | check each child array within the array as well. |
$error_value | A custom value to return instead of HCL_ERROR_VALUE. This is provided so that an array can include HCL_ERROR_VALUE as a value (null by default) without being confused as an error. If not given HCL_ERROR_VALUE will be used instead. |
function array_value_exists_ | ( | $array, | |
$value, | |||
$recurse | |||
) |
Checks to see if an array contains the given value.
$array | The array to search. |
$value | The value to search for. |
$recurse | check each array within the array as well. |
function base64_to_string_ | ( | $value | ) |
Converts a base64 encoded string to ascii string.
$value | The string value to process. |
function camel_case_ | ( | $value, | |
$exceptions | |||
) |
Returns a string which has all first characters in a word capatilized and the rest of the world lower case.
$value | The variable to be checked. |
function ceiling_ | ( | $value | ) |
Returns the highest integer value to the given variable.
$value | The variable to processed. |
function convert_units_ | ( | $data, | |
$value, | |||
$from_unit, | |||
$to_unit, | |||
$precision | |||
) |
Converts a value from one unit to another.
$data | The HCL json string to draw the unit information from. The string should have a variable named: HCL_DATA_UNIT_xxx. |
$value | The variable to processed. |
$from_unit | The unit $value should be given in. The string should have a variable named: HCL_DATA_UNIT_xxx_xxx. |
$to_unit | The unit $value should be returned in. The string should have a variable named: HCL_DATA_UNIT_xxx_xxx. |
$precision | The number of decimal points to include in the return value. |
function cube_ | ( | $value, | |
$precision | |||
) |
Returns the value of value to the 3rd power with the given precision.
$value | The variable to processed. |
$precision | The number of decimal points to include in the return value. |
function cube_root_ | ( | $value, | |
$precision | |||
) |
Returns the cube root value of value with the given precision.
W
$value | The variable to processed. |
$precision | The number of decimal points to include in the return value. |
function float_to_string_ | ( | $value, | |
$precision | |||
) |
Returns the given float value as a string value.
$value | The variable to processed. |
$precision | The number of decimal points to include in the return value. |
function floor_ | ( | $value | ) |
Returns the lowest integer value to the given variable.
$value | The value to be checked. |
function get_available_data_array_ | ( | ) |
function get_available_data_defines_ | ( | ) |
function get_data_value_ | ( | $data_source, | |
$key | |||
) |
function get_timestamp_ | ( | $format, | |
$timestamp_precision | |||
) |
Returns a timestamp in the given format and precision.
$format | - The format of timestamp to be returned. |
$timestamp_precision | - The precision of the timestamp to be returned. |
function get_timestamps_ | ( | ) |
Returns an array of timestamp values in second, millisecond and microsecond precision.
function get_type_ | ( | $value, | |
$flags | |||
) |
function get_user_agent_browser_name_ | ( | ) |
Returns a string with name of the browser as parsed from the User Agent string.
function get_user_agent_browser_version_ | ( | ) |
Returns a string with version of the browser as parsed from the User Agent string.
function get_user_agent_cpu_architecture_ | ( | ) |
Returns a string with architecture of the browser's operating system as parsed from the User Agent string.
function get_user_agent_data_array_ | ( | ) |
Returns an array with details about the browser that has been parsed from the User Agent string. The array indexes are generated from the HCL_CORE_USER_AGENT_xxx defines.
function get_user_agent_device_model_ | ( | ) |
Returns a string with name of the device's model as parsed from the User Agent string.
function get_user_agent_device_type_ | ( | ) |
Returns a string with type of device as parsed from the User Agent string.
function get_user_agent_device_vendor_ | ( | ) |
Returns a string with name of the device's vendor as parsed from the User Agent string.
function get_user_agent_engine_name_ | ( | ) |
Returns a string with name of the browser's engine as parsed from the User Agent string.
function get_user_agent_engine_version_ | ( | ) |
Returns a string with version of the browser's engine as parsed from the User Agent string.
function get_user_agent_os_name_ | ( | ) |
Returns a string with name of the browser's operating system as parsed from the User Agent string.
function get_user_agent_os_version_ | ( | ) |
Returns a string with the version of the browser's operating system as parsed from the User Agent string.
function get_user_agent_string_ | ( | ) |
Returns the browsers User Agent string.
function hcl_feature_ | ( | $hcl_feature | ) |
function hcl_features_ | ( | ) |
function in_range_ | ( | $value, | |
$minimum, | |||
$maximum | |||
) |
Checks if a given numeric value is between a minimum and maximum value, inclusive.
$value | The value to be checked. Must be a numeric value. |
$minimum | The minimum allowed numeric value. Must be a numeric value. |
$maximum | The maximum allowed numeric value. Must be a numeric value. |
function in_range_value_ | ( | $value, | |
$minimum, | |||
$maximum | |||
) |
Returns a number that is within the minimum and maximum values given.
$value | The value to be checked. Must be a numeric value. |
$minimum | The minimum allowed value. Must be a numeric value. |
$maximum | The maximum allowed value. Must be a numeric value. |
function integer_to_string_ | ( | $value | ) |
Returns the given integer value as a string value.
$value | The variable to processed. |
function is_alphabetic_string_ | ( | $value | ) |
Determines if a given string contains ONLY characters within the alphabet (ie a-z and A-Z)
$value | Value to be checked. |
function is_alphanumeric_string_ | ( | $value | ) |
Determines if a given string contains ONLY characters within the alphabet or numberic digits (ie a-z and A-Z and 0-9)
$value | Value to be checked. |
function is_array_ | ( | $value | ) |
Determines if a given variable is an array.
$value | Value to be checked. |
function is_base_64_string_ | ( | $value | ) |
Determines if a variable is a base_64 encoded string.
$value | to be checked. |
function is_boolean_ | ( | $value | ) |
Determines if a variable is a boolean value.
$value | Value to be checked. |
function is_boolean_string_ | ( | $value, | |
$terms, | |||
$case_sensitive | |||
) |
Determines if a variable is a string containing certain values to indicate true or false.
$value | to be checked. |
$terms | A comma seperated string of the values to consider boolean true or boolean false. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function is_defined_ | ( | $value | ) |
Determines if a variable has been defined.
$value | The variable to be checked. |
function is_digit_string_ | ( | $value | ) |
Determines if a variable is a string that contains ONLY digits (ie 0,1,2,3,4,5,6,7,8 or 9).
$value | The variable to be checked. |
function is_email_string_ | ( | $value | ) |
Determines if a variable is a string that contains a valid email address.
$value | The variable to be checked. |
function is_empty_string_ | ( | $value | ) |
Determines if a variable is a string that has no characters (ie "").
$value | The variable to be checked. |
function is_even_ | ( | $value | ) |
Determif a given variable is even.
$value | The variable to be checked. |
function is_float_ | ( | $value | ) |
Determines if a variable is a float.
$value | The variable to be checked. |
function is_float_string_ | ( | $value | ) |
Determines if a variable is a string that contains an float value.
$value | The value to be checked. |
function is_function_name_ | ( | $value | ) |
Determines if the given string is the name of a defined function.
$value | The value to be checked. |
function is_hexidecimal_string_ | ( | $value | ) |
Determines if a variable is a string containing only hexidecimal values.
$value | The variable to be checked. |
function is_integer_ | ( | $value | ) |
Determines if a variable is an integer.
$value | The variable to be checked. |
function is_integer_string_ | ( | $value | ) |
Determines if a variable is a string that contains an integer value.
$value | The value to be checked. |
function is_ip_v4_string_ | ( | $value | ) |
Determines if a variable is a string that contains a valid IPv4 string.
$value | The variable to be checked. |
function is_ip_v6_string_ | ( | $value | ) |
Determines if a variable is a string that contains a valid IPv6 string.
$value | The variable to be checked. |
function is_json_string_ | ( | $value | ) |
Determines if a variable is a string that contains a valid json string.
$value | The value to be checked. |
function is_md5_string_ | ( | $value | ) |
Determines if a variable is the proper format for an md5 hash string.
$value | The value to be checked. |
function is_negative_ | ( | $value | ) |
Determines if a variable is a negative numeric value.
$value | The variable to be checked. |
function is_negative_float_ | ( | $value | ) |
Determines if a variable is a negative float value.
$value | The variable to be checked. |
function is_negative_integer_ | ( | $value | ) |
Determines if a variable is a negative float value.
$value | The variable to be checked. |
function is_null_ | ( | $value | ) |
Determines if a variable is null.
$value | The variable to be checked. |
function is_numeric_ | ( | $value | ) |
Determines if a variable is either an integer or a float.
$value | The variable to be checked. |
function is_numeric_string_ | ( | $value | ) |
Determines if a variable is a string that contains an integer value or a float value.
$value | The value to be checked. |
function is_object_ | ( | $value | ) |
Determines if a variable is an object.
$value | The variable to be checked. |
function is_odd_ | ( | $value | ) |
Determines if a given variable is odd.
function is_positive_ | ( | $value | ) |
Determines if a variable is a positive numeric value.
$value | The variable to be checked. |
function is_positive_float_ | ( | $value | ) |
Determines if a variable is a positive float value.
$value | The variable to be checked. |
function is_positive_integer_ | ( | $value | ) |
Determines if a variable is a positive integer value.
$value | The variable to be checked. |
function is_social_security_number_string_ | ( | $value | ) |
Determines if a variable is a string that contains a social security number.
$value | The variable to be checked. |
function is_string_ | ( | $value | ) |
Determines if a variable is a string.
$value | The variable to be checked. |
function is_validated_zip_code_ | ( | $value | ) |
Determines if $value is listed in the HCL_DATA_ZIP_CODE data files. If so it is a confirmed existing zip code, not just a 5 digit integer.
$value | The variable to be checked. |
function is_zip_code_string_ | ( | $value | ) |
Determines if a variable is a string that contains a zip code.
$value | The variable to be checked. |
function json_to_array_ | ( | $json | ) |
function json_to_object_ | ( | $json | ) |
function lower_case_ | ( | $value | ) |
Returns a string in which all characters have been converted to lower case.
$value | The variable to be converted. |
function maximum_ | ( | $values | ) |
Returns the largest numeric value in an array.
$values | An array or object of numeric values (integer or float) or a csv string of numeric values (integer or float). |
function md5_ | ( | $value, | |
$lower_case | |||
) |
Returns a string containing an md5 hash of the input string.
$value | The variable to be converted to an md5 hash. |
$lower_case | If the returned hash should be lower or upper case. |
function mean_ | ( | $values, | |
$precision | |||
) |
Returns the average (mean) value of an array of numeric values.
$values | An array or object of numeric values (integer or float) or a csv string of numeric values (integer or float). |
$precision | The precision of the float to be returned. |
function minimum_ | ( | $values | ) |
Returns the smallest numeric value (integer or float) in an array.
$values | An array of numeric values (integer or float) or a csv string of numeric values (integer or float). |
function negate_ | ( | $value | ) |
Returns the negative value of the given value.
$value | The value to be negated. |
function password_strength_ | ( | $password, | |
$minimum_length | |||
) |
Calculates the bits of entropy for a given password.
$password | The password to be checked. |
$minimum_length | The number of characters a password should be to be considered "secure". |
function pi_ | ( | ) |
Returns the value of pi.
function power_ | ( | $base, | |
$exponent, | |||
$precision | |||
) |
Returns the value base to the exponent power.
function random_ | ( | $minimum, | |
$maximum | |||
) |
Returns a random integer between minimum and maximum.
$minimum | The $minimum allowed value. |
$maximum | The $maximum allowed value. |
function random_float_ | ( | $minimum, | |
$maximum, | |||
$precision | |||
) |
Returns a integer between $minimum and $maximum.
$minimum | The minimum allowed value. |
$maximum | The maximum allowed value. |
function random_integer_ | ( | $minimum, | |
$maximum | |||
) |
Returns a random integer between $minimum and $maximum.
function round_ | ( | $value, | |
$precision | |||
) |
Returns a numeric value that is rounded to the given precision.
$value | The numeric value to round. |
$precision | The number of decimal points to round to. |
function square_ | ( | $value, | |
$precision | |||
) |
Returns the given value raised to the second power and truncated to the given precision.
$value | The numeric value to round. |
$precision | The number of decimal points to truncate to. |
function square_root_ | ( | $value, | |
$precision | |||
) |
Returns the square root of the given value truncated to the given precision.
$value | The numeric value to round. |
$precision | The number of decimal points to truncate to. |
function string_begins_with_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
Checks if a string begins with a given substring.
$value | The string to check |
$substring | The substring to search the value string for. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_contains_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
Checks if a string contains a given substring.
$value | The string to check. |
$substring | The substring to search the value string for. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_ends_with_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
Checks if a string ends with a given substring.
$value | The string to check. |
$substring | The substring to search the value string for. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_everything_after_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
Returns everything after the first occurance of the given substring.
$value | The string to check. |
$substring | The substring to search for. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_everything_before_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
Returns everything before the first occurance of the given substring.
$value | The string to check |
$substring | The substring to search for. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_everything_between_ | ( | $value, | |
$first_string, | |||
$second_string, | |||
$case_sensitive | |||
) |
Returns everything between the first occurance of $first_string and the first occurance of $second_string.
$value | The string to check. |
$first_string | The first string to find in $value. |
$second_string | The first string to find in $value. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_index_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
Returns the index of the first occurance of substring within a string.
$value | The string to check. |
$substring | The substring to search the primary string for. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_index_valid_ | ( | $value, | |
$index | |||
) |
Checks if a given $index is inside the bounds of $value.
$value | The string to check the index against. |
$index | The zero based index to check. |
function string_length_ | ( | $value | ) |
Returns the length of a given string.
$value | The string to check |
function string_longest_line_ | ( | $value | ) |
Returns the longest string in an array or string that is seperated by end lines.
$value | The string to check. |
function string_longest_line_index_ | ( | $value | ) |
Returns the index of the longest string in an array or string that is seperated by end lines.
$value | The string to check. |
function string_longest_line_length_ | ( | $value | ) |
Returns the length of the longest string in an array or string that is seperated by end lines.
$value | The string to check. |
function string_occurance_count_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
Returns the number of times a substring or substring(s) occur within an array or string.
$value | The string to check. |
$substring | The substring(s) to search the primary string for. Can be a single string or an array of strings. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_position_ | ( | $value, | |
$substring, | |||
$case_sensitive | |||
) |
function string_replace_ | ( | $value, | |
$search, | |||
$replacement, | |||
$case_sensitive | |||
) |
Returns the given string with all instances of search replaced by replacement.
$value | The initial string. |
$search | The string to search for occurances. |
$replacement | The string to replace occurances. |
$case_sensitive | Whether the string check should be case sensitive or not. |
function string_reversed_ | ( | $value | ) |
Returns the given string in reversed order.
$value | The string to reverse. |
function string_to_array_ | ( | $value, | |
$delimiter | |||
) |
function string_to_base64_ | ( | $value | ) |
Returns the given string converted to base 64.
$value | The string to be converted. |
function string_to_float_ | ( | $value | ) |
function string_to_integer_ | ( | $value | ) |
function string_truncate_ | ( | $value, | |
$length, | |||
$append | |||
) |
Returns the given string reduced to the given length.
$value | The string to be converted. |
$length | The number of characters of $value to return. |
$append | A string value that will be appended to the end of the return string. |
function string_validate_characters_allowed_ | ( | $value, | |
$characters, | |||
$case_sensitive | |||
) |
Checks if the given string contains ONLY the allowed characters supplied.
value | The string to be converted. |
characters | A string containing the characters that are allowed. |
case_sensitive | A boolean true or false indicating if the search should be case sensitive or not. |
function string_validate_characters_forbidden_ | ( | $value, | |
$characters, | |||
$case_sensitive | |||
) |
Checks to see if the string is valid (ie does not contain any forbidden characters)
value | The string to be converted. |
characters | A string containing the characters that are forbidden. |
case_sensitive | A boolean true or false indicating if the search should be case sensitive or not. |
function substring_by_length_ | ( | $value, | |
$start, | |||
$length | |||
) |
Returns a portion of a string.
$value | The variable to be converted. |
$start | The position of the first character to be returned. |
$length | The position of the first character to be returned. |
function substring_by_position_ | ( | $value, | |
$start, | |||
$end | |||
) |
Returns a portion of a string.
$value | The variable to be converted. |
$start | The position of the first character to be returned. |
$end | The position of the last character to be returned. |
function sum_ | ( | $values, | |
$precision, | |||
$recurse | |||
) |
Returns the sum of the numeric values in an array or comma seperated string.
$values | An array of values to be added. |
$precision | The number of decimal points to truncate to. |
$recurse | Determines if the function should check each array within the array as well |
function trim_ | ( | $value | ) |
Returns a string in which all white space at the beginning of the string and end of the string has been removed.
$value | The variable to be converted. |
function trim_left_ | ( | $value | ) |
Returns a string in which all white space at the beginning of the string has been removed.
$value | The variable to be converted. |
function trim_right_ | ( | $value | ) |
Returns a string in which all white space at the end of the string has been removed.
$value | The variable to be converted. |
function truncate_float_ | ( | $value, | |
$precision | |||
) |
Returns a value as a float which has been trucated to the given precision.
function upper_case_ | ( | $value | ) |
Returns a string in which all characters have been converted to upper case.
$value | The variable to be converted. |
var HCL_ARRAY_FUNCTIONS_RECURSE_DEFAULT = false |
Determines if an array (or object for javascript) function should recurse by default.
var HCL_ARRAY_SANITIZE_KEEP = "keep" |
var HCL_ARRAY_SANITIZE_KEYS = "keys" |
var HCL_ARRAY_SANITIZE_REMOVE = "remove" |
var HCL_ARRAY_SANITIZE_REPLACE = "replace" |
var HCL_ARRAY_SANITIZE_TYPES = "types" |
var HCL_ARRAY_SANITIZE_VALUES = "values" |
var HCL_ARRAY_SANITIZE_VALUES_RANGE = "range" |
var HCL_CORE_USER_AGENT_BROWSER_NAME = 2 |
var HCL_CORE_USER_AGENT_BROWSER_VERSION = 4 |
var HCL_CORE_USER_AGENT_CPU_ARCHITECTURE = 1024 |
var HCL_CORE_USER_AGENT_DEVICE_MODEL = 8 |
var HCL_CORE_USER_AGENT_DEVICE_TYPE = 16 |
var HCL_CORE_USER_AGENT_DEVICE_VENDOR = 32 |
var HCL_CORE_USER_AGENT_ENGINE_NAME = 64 |
var HCL_CORE_USER_AGENT_ENGINE_VERSION = 128 |
var HCL_CORE_USER_AGENT_OS_NAME = 256 |
var HCL_CORE_USER_AGENT_OS_VERSION = 512 |
var HCL_CORE_USER_AGENT_STRING = 1 |
var HCL_CORE_USER_AGENT_USER_AGENT_UNDEFINED = 0 |
var HCL_DEBUG = true |
If true debug statements will be output by console.log.
var HCL_DEBUG_LEVEL_ERROR = 4 |
var HCL_DEBUG_LEVEL_NOTICE = 1 |
var HCL_DEBUG_LEVEL_OUTPUT = HCL_DEBUG_LEVEL_ERROR |
var HCL_DEBUG_LEVEL_WARNING = 2 |
var HCL_DEBUG_OUTPUT_STACK = true |
var HCL_ERROR_VALUE = null |
This is the value that will be returned for all errors.
var HCL_FEATURES_BROWSER_DETECTION = 4 |
var HCL_FEATURES_CONVERSION_DATA_LOADED = 2 |
Indicates that the HCL function convert_ has the data it needs to perform conversions.
var HCL_FEATURES_FULL_ZIP_CODE_VALIDATION = 8 |
var HCL_FEATURES_MICROSECOND_TIMESTAMP_PRECISION = 1 |
Indicates that the HCL can return timestamps to the microsecond (1 / 1,000,000 sec)
var HCL_MATH_DEFAULT_PRECISION = 0 |
The precision that will be used if no precision if given to a function.
var HCL_MATH_MAXIMUM_PRECISION = 8 |
The maximum precision that can be set for any function that requires a precision argument.
var HCL_MATH_PI = 3.1415926535 |
A float for Pi to 10 digits. Taken from http://www.piday.org/million
var HCL_OPERATIONS_EQUAL = "==" |
var HCL_OPERATIONS_GREATER_THAN = ">" |
var HCL_OPERATIONS_GREATER_THAN_OR_EQUAL = ">=" |
var HCL_OPERATIONS_LESS_THAN = "<" |
var HCL_OPERATIONS_LESS_THAN_OR_EQUAL = "<=" |
var HCL_OPERATIONS_NOT_EQUAL = "!=" |
var HCL_STRING_BOOLEAN_STRING_FALSE_VALUES = "f,false,n,no,0" |
The string values that are considered false.
var HCL_STRING_BOOLEAN_STRING_TRUE_VALUES = "t,true,y,yes,1" |
The string values that are considered true.
var HCL_STRING_BOOLEAN_STRING_VALUES = HCL_STRING_BOOLEAN_STRING_FALSE_VALUES + "," + HCL_STRING_BOOLEAN_STRING_TRUE_VALUES |
var HCL_STRING_CAMEL_CASE_EXCEPTIONS = "a,and,or,the" |
This variable is a comma delimited string containing words that will be in lower case in the final camelcase string.
var HCL_STRING_CASE_SENSITIVE_DEFAULT = false |
This variable determines which value a function with a "case sensitive" argument should use if the argument is not given.
var HCL_STRING_FIRST_SUBSTRING_NOT_FOUND = -2 |
Indicates that the first given substring is not found when using a string function.
var HCL_STRING_LOWER_CASE_DEFAULT = true |
This variable determines if string output should be returned in lower case by default.
var HCL_STRING_MD5_LOWER_CASE_DEFAULT = true |
This variable determines if an md5 hash value should be returned in lower case by default.
var HCL_STRING_PASSWORD_MINIMUM_LENGTH_DEFAULT = 8 |
The length of a string to be considered secure. Used for the password_strength_ function.
var HCL_STRING_REGEX_ALPHA = /^[a-zA-Z]+$/ |
var HCL_STRING_REGEX_ALPHANUMERIC = /^[0-9a-zA-Z]+$/ |
var HCL_STRING_REGEX_DIGITS = /^[0-9]+$/ |
var HCL_STRING_REGEX_EMAIL_ADDRESS = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ |
var HCL_STRING_REGEX_HEXIDECIMAL = /^[0-9a-fA-F]+$/ |
var HCL_STRING_SECOND_SUBSTRING_NOT_FOUND = -3 |
Indicates that the second given substring is not found when using a string function.
var HCL_STRING_SUBSTRING_NOT_FOUND = -1 |
Indicates that the given substring is not found when using a string function.
var HCL_STRING_TO_ARRAY_DEFAULT_DELIMITER = "," |
var HCL_TIMESTAMP_FORMAT_DEFAULT = HCL_TIMESTAMP_FORMAT_INTEGER |
This variable determines which value a function with a timestamp format argument should use if the argument is not given.
var HCL_TIMESTAMP_FORMAT_FLOAT = 1 |
This variable determines that timestamp should be given as floats with the whole second as the integer part and fractions of a second given as the decimal part.
var HCL_TIMESTAMP_FORMAT_INTEGER = 0 |
This variable determines that timestamp should be given as integers with no decimal part.
var HCL_TIMESTAMP_PRECISION_DEFAULT = HCL_TIMESTAMP_PRECISION_SECOND |
This variable determines which value a function with a timestamp precision argument should use if the argument is not given.
var HCL_TIMESTAMP_PRECISION_MICROSECONDS = 2 |
This variable determines that timestamp should be given in microseconds (1/1000000) since the epoch (00:00 on 01-01-1970).
var HCL_TIMESTAMP_PRECISION_MILLISECONDS = 1 |
This variable determines that timestamp should be given in milliseconds (1/1000) since the epoch (00:00 on 01-01-1970).
var HCL_TIMESTAMP_PRECISION_SECOND = 0 |
This variable determines that timestamp should be given in whole seconds since the epoch (00:00 on 01-01-1970).
var HCL_TYPE_ARRAY = "array" |
The string definition the HCL uses to indicate an array variable.
var HCL_TYPE_BOOLEAN = "boolean" |
The string definition the HCL uses to indicate a boolean variable.
var HCL_TYPE_FLOAT = "float" |
The string definition the HCL uses to indicate a float variable.
var HCL_TYPE_INTEGER = "integer" |
The string definition the HCL uses to indicate an integer variable.
var HCL_TYPE_NULL = "null" |
The string definition the HCL uses to indicate a null variable.
var HCL_TYPE_OBJECT = "object" |
The string definition the HCL uses to indicate an object variable.
var HCL_TYPE_STRING = "string" |
The string definition the HCL uses to indicate a string variable.
var HCL_TYPE_UNDEFINED = "undefined" |
The string definition the HCL uses to indicate an undefined variable.
var HCL_VERSION = "0.1" |
The version number of this HCL library.
var JAVASCRIPT_NEW_LINE = "\n" |
The new line character for javascript.
var JAVASCRIPT_TYPE_ARRAY = "array" |
The string value returned from javascript's typeof operator for an array variable.
var JAVASCRIPT_TYPE_BOOLEAN = "boolean" |
The string value returned from javascript's typeof operator for a boolean variable.
var JAVASCRIPT_TYPE_FUNCTION = "function" |
The string value returned from javascript's typeof operator for a function variable.
var JAVASCRIPT_TYPE_NULL = "null" |
The string value returned from javascript's typeof operator for a null variable.
var JAVASCRIPT_TYPE_NUMERIC = "number" |
The string value returned from javascript's typeof operator for a number variable.
var JAVASCRIPT_TYPE_OBJECT = "object" |
The string value returned from javascript's typeof operator for an object variable.
var JAVASCRIPT_TYPE_STRING = "string" |
The string value returned from javascript's typeof operator for a string variable.
var JAVASCRIPT_TYPE_UNDEFINED = "undefined" |
The string value returned from javascript's typeof operator for an undefined variable.