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()"
@@ 7254-7268 (lines=15) @@
7251
   *
7252
   * @return string <p>The resulting string</p>
7253
   */
7254
  public static function ucfirst($str, $encoding = 'UTF-8', $cleanUtf8 = false)
7255
  {
7256
    $strPartTwo = self::substr($str, 1, null, $encoding, $cleanUtf8);
7257
    if ($strPartTwo === false) {
7258
      $strPartTwo = '';
7259
    }
7260
7261
    $strPartOne = self::strtoupper(
7262
        (string)self::substr($str, 0, 1, $encoding, $cleanUtf8),
7263
        $encoding,
7264
        $cleanUtf8
7265
    );
7266
7267
    return $strPartOne . $strPartTwo;
7268
  }
7269
7270
  /**
7271
   * alias for "UTF8::ucfirst()"