You are here

public static function WebformTextHelper::camelToSnake in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Utility/WebformTextHelper.php \Drupal\webform\Utility\WebformTextHelper::camelToSnake()

Converts camel case to snake case (i.e. underscores).

Parameters

string $string: String to be converted.

Return value

string String with camel case converted to snake case.

1 call to WebformTextHelper::camelToSnake()
Webform::invokeHandlerAlter in src/Entity/Webform.php
Alter a webform handler when it is invoked.

File

src/Utility/WebformTextHelper.php, line 41

Class

WebformTextHelper
Provides helper to operate on strings.

Namespace

Drupal\webform\Utility

Code

public static function camelToSnake($string) {
  return static::getCamelCaseToSnakeCaseNameConverter()
    ->normalize($string);
}