Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   Болталка (https://forum.antichat.xyz/forumdisplay.php?f=46)
-   -   слова в char (https://forum.antichat.xyz/showthread.php?t=153846)

navai 04.11.2009 23:19

слова в char
 
Люди , киньте сайт или скрипт , который преобразовывает обычные слова в char(115,117,118) к примеру.
буду очень благодарен.

L I G A 04.11.2009 23:28

как то писал на пыхе и чар и орд:
PHP код:

<?php

function oord($str){
    if(
$str!==''){
    for(
$x=0;$x<strlen(trim($str));$x++){
        
$result.='<b><font color="green">chr('.ord($str{$x}).')</font></b>,';
        }
    }else{
        
$result'NULL';
        }
    return 
$result;
    }
  
$str='omfg';
  echo 
oord($str);
?>

PHP код:

<?php

function cchr($int){
    if(
$int!==''){
     
$int=explode(',',trim($int));
    for(
$x=0;$x<=count($int);$x++){
        
$result.='<b><font color="green">ord('.chr($int[$x]).')</font></b>';
        }
    }else{
        
$result'NULL';
        }
    return 
$result;
    }
  
$str='45,46,23,2,,5,77,';
  echo 
cchr($str);
?>


SpangeBoB 04.11.2009 23:53

Решение на powershell:
[int[]][char[]]"Powershell"
Вывод
112
111
119
101
114
115
104
101
108
108

cupper 05.11.2009 01:13

Цитата:

http:/_/quest.fsb-my.name/code.php
из чего угодно во что угодно, сам постоянно юзаю


Время: 07:50