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()"
@@ 7196-7210 (lines=15) @@
7193
   *
7194
   * @return string <p>The resulting string</p>
7195
   */
7196
  public static function ucfirst($str, $encoding = 'UTF-8', $cleanUtf8 = false)
7197
  {
7198
    $strPartTwo = self::substr($str, 1, null, $encoding, $cleanUtf8);
7199
    if ($strPartTwo === false) {
7200
      $strPartTwo = '';
7201
    }
7202
7203
    $strPartOne = self::strtoupper(
7204
        (string)self::substr($str, 0, 1, $encoding, $cleanUtf8),
7205
        $encoding,
7206
        $cleanUtf8
7207
    );
7208
7209
    return $strPartOne . $strPartTwo;
7210
  }
7211
7212
  /**
7213
   * alias for "UTF8::ucfirst()"