Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Aug 8th, 2004, 9:26 PM   #1
Kylixen
Programmer
 
Kylixen's Avatar
 
Join Date: Jun 2004
Location: SC
Posts: 60
Rep Power: 5 Kylixen is on a distinguished road
Send a message via AIM to Kylixen Send a message via MSN to Kylixen
#include <stdio.h>
#include <string.h>

int main(int argc, char *argv[]){

	char string[80] = "";
	char new_string[80] = "";
	
	int counter;

	for(counter = 1; counter < argc; counter++){

 strcat(string, argv[counter]);
 strcat(string, " ");
 
	} 

	convert(string, new_string);	

	printf("%s", new_string);

}

convert(char *string, char *new_string){

	int counter;
	
	for(counter = 0; counter < strlen(string); counter++){

 switch(string[counter]){
 
 	case 'A':
  new_string[counter] = '4';
  break;
 	case 'a':
  new_string[counter] = '4';
  break;
 	case 'B':
  new_string[counter] = '8';
  break;
 	case 'b':
  new_string[counter] = '8';
  break;
 	case 'E':
  new_string[counter] = '3';
  break;
 	case 'e':
  new_string[counter] = '3';
  break;
 	case 'L':
  new_string[counter] = '1';
  break;
 	case 'l':
  new_string[counter] = '1';
  break;
 	case 'O':
  new_string[counter] = '0';
  break;
 	case 'o':
  new_string[counter] = '0';
  break;
 	case 'S':
  new_string[counter] = '5';
  break;
 	case 's':
  new_string[counter] = '5';
  break;  
 	case 'T':
  new_string[counter] = '7';
  break;
 	case 't':
  new_string[counter] = '7';
  break;
 	default:
  new_string[counter] = string[counter];
  break;

 }
	
	}

}

http://www.tsargoth.com/kylixen/leet.c

Just for kicks
__________________
ALLOW IMAGES IN SIGNATURES NOW
Kylixen is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:07 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC