#include <stdio.h>
#include <string.h>
#include <ctype.h>

#define MAX_BUFFER 1024


const char * leet_from_str(const char *s)
{
    static char buffer[MAX_BUFFER];
    static int MAX_INDEX = ( 'z' - 'a' ) + 1;
    static const char * leet_alphabet[] = {
        "4",
        "8",
        "(",
        "C-",
        "3",
        "|",
        "C-",
        "#",
        "1",
        "]",
        "|<",
        "|_",
        "[V]",
        "/V",
        "0",
        "|7",
        "9",
        "|2",
        "5",
        "7",
        "|_|",
        "\\/",
        "\\N",
        "><",
        "'/",
        "2",    
    };
    
    const char * chs = s;
    *buffer = '\0';
    
    while( *chs != '\0' ) {
        int index = tolower( *chs ) - 'a';
        
        if ( index < 0
          && index >= MAX_INDEX )
        {
            fprintf( stderr, "ERROR: se esperaba 'a'-'z', no: %c\n", *chs );
        }
        
        strcat( buffer, leet_alphabet[ index ] );
        ++chs;
        
        if ( strlen( buffer ) >= ( MAX_BUFFER - 2 ) ) {
        	break;
        }
    }
    
    return buffer;
}


int main(void)
{
    printf( "%s\n", leet_from_str( "Baltasar" ));
    return 0;
}
