Code Duplication    Length = 15-15 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3325-3339 (lines=15) @@
3322
   *
3323
   * @return string <p>The resulting string</p>
3324
   */
3325
  public static function lcfirst($str, $encoding = 'UTF-8', $cleanUtf8 = false)
3326
  {
3327
    $strPartTwo = self::substr($str, 1, null, $encoding, $cleanUtf8);
3328
    if ($strPartTwo === false) {
3329
      $strPartTwo = '';
3330
    }
3331
3332
    $strPartOne = self::strtolower(
3333
        (string)self::substr($str, 0, 1, $encoding, $cleanUtf8),
3334
        $encoding,
3335
        $cleanUtf8
3336
    );
3337
3338
    return $strPartOne . $strPartTwo;
3339
  }
3340
3341
  /**
3342
   * alias for "UTF8::lcfirst()"
@@ 7210-7224 (lines=15) @@
7207
   *
7208
   * @return string <p>The resulting string</p>
7209
   */
7210
  public static function ucfirst($str, $encoding = 'UTF-8', $cleanUtf8 = false)
7211
  {
7212
    $strPartTwo = self::substr($str, 1, null, $encoding, $cleanUtf8);
7213
    if ($strPartTwo === false) {
7214
      $strPartTwo = '';
7215
    }
7216
7217
    $strPartOne = self::strtoupper(
7218
        (string)self::substr($str, 0, 1, $encoding, $cleanUtf8),
7219
        $encoding,
7220
        $cleanUtf8
7221
    );
7222
7223
    return $strPartOne . $strPartTwo;
7224
  }
7225
7226
  /**
7227
   * alias for "UTF8::ucfirst()"