<?php
declare(strict_types=1);

namespace WP_AUX\Services;

class StringsService
{
  public static function nameToCamelCase(string $name, bool $ucfirst = false): string
  {
    $separator = '_';
    $camelCase = str_replace($separator, '', ucwords($name, $separator));

    return ($ucfirst) ? ucfirst($camelCase) : lcfirst($camelCase);
  }
}
