403Webshell
Server IP : 54.94.228.101  /  Your IP : 172.28.1.13
Web Server : Apache
System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/vinumday2_0/vendor/patchwork/utf8/src/Patchwork/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/vinumday2_0/vendor/patchwork/utf8/src/Patchwork//TurkishUtf8.php
<?php

/*
 * Copyright (C) 2016 Nicolas Grekas - p@tchwork.com
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the (at your option):
 * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or
 * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt).
 */

namespace Patchwork;

/**
 * Turkish locale specialized version of Patchwork\Utf8.
 */
class TurkishUtf8 extends Utf8
{
    public static function strtocasefold($s, $full = true)
    {
        if (false !== strpos($s, 'İ')) {
            $s = str_replace('İ', 'i', $s);
        }

        return parent::strtocasefold($s, $full);
    }

    public static function stripos($s, $needle, $offset = 0)
    {
        if (false !== strpos($needle, 'I')) {
            $needle = str_replace('I', 'ı', $needle);
        }
        if (false !== strpos($needle, 'İ')) {
            $needle = str_replace('İ', 'i', $needle);
        }
        if (false !== strpos($s, 'I')) {
            $s = str_replace('I', 'ı', $s);
        }
        if (false !== strpos($s, 'İ')) {
            $s = str_replace('İ', 'i', $s);
        }

        return parent::stripos($s, $needle, $offset);
    }

    public static function strripos($s, $needle, $offset = 0)
    {
        if (false !== strpos($needle, 'I')) {
            $needle = str_replace('I', 'ı', $needle);
        }
        if (false !== strpos($needle, 'İ')) {
            $needle = str_replace('İ', 'i', $needle);
        }
        if (false !== strpos($s, 'I')) {
            $s = str_replace('I', 'ı', $s);
        }
        if (false !== strpos($s, 'İ')) {
            $s = str_replace('İ', 'i', $s);
        }

        return parent::strripos($s, $needle, $offset);
    }

    public static function stristr($s, $needle, $before_needle = false)
    {
        $needle = self::stripos($s, $needle);
        if (false === $needle) {
            return false;
        }
        if ($before_needle) {
            return self::substr($s, 0, $needle);
        }

        return self::substr($s, $needle);
    }

    public static function strrichr($s, $needle, $before_needle = false)
    {
        $needle = self::strripos($s, $needle);
        if (false === $needle) {
            return false;
        }
        if ($before_needle) {
            return self::substr($s, 0, $needle);
        }

        return self::substr($s, $needle);
    }

    public static function strtolower($s)
    {
        if (false !== strpos($s, 'İ')) {
            $s = str_replace('İ', 'i', $s);
        }
        if (false !== strpos($s, 'I')) {
            $s = str_replace('I', 'ı', $s);
        }

        return parent::strtolower($s);
    }

    public static function strtoupper($s)
    {
        if (false !== strpos($s, 'i')) {
            $s = str_replace('i', 'İ', $s);
        }

        return parent::strtoupper($s);
    }

    public static function str_ireplace($search, $replace, $subject, &$count = null)
    {
        $search = (array) $search;

        foreach ($search as $i => $s) {
            if ('' === $s .= '') {
                $s = '/^(?<=.)$/';
            } else {
                $s = preg_quote($s, '/');
                $s = strtr($s, array(
                    'i' => '(?-i:[iİ])',
                    'İ' => '(?-i:[iİ])',
                    'ı' => '(?-i:[ıI])',
                    'I' => '(?-i:[ıI])',
                ));
                $s = "/{$s}/ui";
            }

            $search[$i] = $s;
        }

        $subject = preg_replace($search, $replace, $subject, -1, $replace);
        $count = $replace;

        return $subject;
    }

    public static function ucfirst($s)
    {
        if ('i' === substr($s, 0, 1)) {
            return 'İ'.substr($s, 1);
        } else {
            return parent::ucfirst($s);
        }
    }

    public static function ucwords($s)
    {
        if (false !== strpos($s, 'i')) {
            $s = preg_replace('/\bi/u', 'İ', $s);
        }

        return parent::ucwords($s);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit