You are here

function enterprise_base_create_machine_name in Enterprise Base 7.3

Convert a string to lowercase with underscores and safe for machine names

1 call to enterprise_base_create_machine_name()
enterprise_fields_blog_author in enterprise_fields/enterprise_fields.module

File

./enterprise_base.module, line 78

Code

function enterprise_base_create_machine_name($string, $replacement = '_') {
  return preg_replace('/[^a-z0-9]+/', $replacement, strtolower($string));
}