Aoccdrnig to a rscheearch at an elingsh uinervtisy, it deosn't mttaer in
waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht
frist and lsat ltteer is at the rghit pclae. The rset can be a toatl
mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae we do
not raed ervey lteter by istlef but the wrod as a wlohe.
wroks fnie for me
Itnreestnig...I can raed yuor txet but I had a porlbem on "elingsh".
I tnhik taht nmaes of ctrieounts, tonws, and nemas slhoud slitl be perporly wtirten to be eisaly udnetrsood.
Gday...
finlay.. omes validdadeda resharce..
finlay.. omes validdadeda resharce..
I wolund't hvae bieveled it psibsole, aluthgoh prephas sohlud hvae epeexctd shomiteng lkie tihs: n68 arladey velaiotd the biasc rlue of "cehonert" sructtrue!
As Ania eplianxed,
the olny iprmoetnt tihng is taht frist and lsat ltteer is at the rghit pclae. - M.
lmfao
I can never make up my mind if my favourite poster is n68, or 2bdecided
@ n68 : Bring back the best avatar ever, someone p1ssing on the Norweige flag
finlay.. omes validdadeda resharce..
If I hadn't read this myself ( ), I wouldn't have believed it!!
Ficsanatnig!
And esiaer to wtire tahn h4><0r 1337. You colud ralely mses wtih polepe...
"Waht do you maen my slepling is all mseesd up? It's fnie! Are you dixyslec?"
no conetmmt LOL
I certead tihs slmal pgarrom jsut a few mnieuts ago. It'll mkae winirtg in tihs new and faitciasnng sylte mcuh eiesar, I hpoe.
/* spelling.c
** Copyright (C) 2003 Bálint Balogh
** This program is free software released under the GNU
** General Public License Version 2 or any later version. */
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
/* This is needed because of strfry() */
#ifndef __GLIBC__
#error This program needs the GNU C library
"This program needs the GNU C library" (portable #error)
#endif
#define INCREMENT (1024)
#define MAX_ITERATION (64)
int main( int argc, char *argv[] )
{
char *word = NULL;
char *original = NULL;
size_t length = 0;
size_t allocated = 0;
int ch;
while (1) {
ch = getchar();
if ( !isalpha( ch ) ) {
if ( length ) {
if ( length > 3 ) {
unsigned i = 0;
char end = word[length - 1];
memcpy( original, word + 1, length - 2 );
word[length - 1] = 0;
do {
strfry( word + 1 );
i++;
} while ( i < MAX_ITERATION
&& !memcmp( original, word + 1, length - 2 ) );
word[length - 1] = end;
}
word[length] = 0;
fputs( word, stdout );
length = 0;
}
if ( ch == EOF ) return 0;
putchar( ch );
} else {
if ( allocated <= length + 1 ) {
allocated += INCREMENT;
if ( (word = realloc( word, allocated )) == NULL
|| (original = realloc( original, allocated )) == NULL ) {
fprintf( stderr, "%s: Out of memory. Aborting.\n", argv[0] );
return -1;
}
}
word[length++] = ch;
}
}
}
[Eidt:] Bgfuix.
Ahh... but the true test will be whether or not the program still functions if you encode the code in garbledy-speek.
- M.