Thread: string eqaliser

Results 1 to 7 of 7
  1. #1
    Shanks_'s Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    60
    Reputation
    45
    Thanks
    8
    My Mood
    Pensive

    Lightbulb string eqaliser

    this thing takes 2 strings and eqalises the lentghs. so for example u take "foo" and "foobar" an itll make "foo000" and "foobar" .
    is very hi tech .

    enjoy, (c) me

    Code:
    void fixstrign(char*& lol,char*& hue) {
    	//lengths for maximum efficiency of length
    	int lollen=strlen(lol);
    	int huelen=strlen(hue);
    	
    	if(lollen==huelen) return;
    	bool swape=lollen<huelen; //swapemaster
    	if(swape) {
    		char* tmp=lol;lol=hue;hue=tmp;
    		int tmp2=lollen;lollen=huelen;huelen=tmp2;
    	}
    	//<br>
    	//is made a <br> above to add a line between the lines for to make a line taller
    
    	char* newhue;
    	newhue=new char[lollen];
    	memcpy(newhue,hue,huelen);
    	for(int i=huelen;i<lollen;++i)
    		newhue[i]='0';
    	hue=newhue;
    	//<br>
    	//more of this is <br>
    	if(swape) {
    		char* tmp=lol;
    		lol=hue;
    		hue=tmp;
    	}
    }

  2. #2
    Herpina's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    64
    Reputation
    10
    Thanks
    56
    is of good code? of undetect this month?



  3. #3
    Shanks_'s Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    60
    Reputation
    45
    Thanks
    8
    My Mood
    Pensive
    yes, is of very good code .

  4. #4
    Saltine's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    493
    Reputation
    104
    Thanks
    629
    I make fix of the memory so leak more
    Code:
    void fixstrign(char*& lol,char*& hue) {
    	//lengths for maximum efficiency of length
    	int lollen=strlen(lol);
    	int huelen=strlen(hue);
    	
    	if(lollen==huelen) return;
    	bool swape=lollen<huelen; //swapemaster
    	if(swape) {
    		char* tmp=lol;lol=hue;hue=tmp;
    		int tmp2=lollen;lollen=huelen;huelen=tmp2;
    	}
    	//<br>
    	//is made a <br> above to add a line between the lines for to make a line taller
            char* huehuehuehuehuheuhe = new char[500];
            //is of for to leaking the memory
    	char* newhue;
    	newhue=new char[lollen];
    	memcpy(newhue,hue,huelen);
    	for(int i=huelen;i<lollen;++i)
    		newhue[i]='0';
    	hue=newhue;
    	//<br>
    	//more of this is <br>
    	if(swape) {
    		char* tmp=lol;
    		lol=hue;
    		hue=tmp;
    	}
    }

    Oh no! Vortex is gay!

  5. The Following User Says Thank You to Saltine For This Useful Post:

    Shanks_ (07-29-2013)

  6. #5
    J's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    East Coast
    Posts
    2,164
    Reputation
    452
    Thanks
    5,900
    My Mood
    In Love
    ohmygawd dis is da kewlist ting eye have ever seeeeen

  7. The Following User Says Thank You to J For This Useful Post:

    Shanks_ (07-29-2013)

  8. #6
    Shanks_'s Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    60
    Reputation
    45
    Thanks
    8
    My Mood
    Pensive
    that is a very bright codes . thakn u very much sir

    maximises memry output

    ---------- Post added at 08:19 PM ---------- Previous post was at 08:11 PM ----------

    Quote Originally Posted by J View Post
    ohmygawd dis is da kewlist ting eye have ever seeeeen
    tahnk u j. but wut do u meen wen u say ur a redhat hacker

  9. #7
    Shanks_'s Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    60
    Reputation
    45
    Thanks
    8
    My Mood
    Pensive
    Code:
    int main() {
    	char* test1="foo";
    	char* test2="foobar";
    	
    	fixstrign(test1,test2);
    	cout<<test1<<endl;
    	cout<<test2<<endl;
    	
    	return 0;
    }
    is esee 2 test

    takes foo and triple zeros it to maximize strign eqelity


    haha wen u uuse a long string it taeks the 0s and gose like
    00000000000000
    hhahahah

Similar Threads

  1. [HELP] User-Definable Function Strings
    By ilovepie21 in forum Visual Basic Programming
    Replies: 1
    Last Post: 04-24-2008, 09:16 PM
  2. all detectable strings
    By mojo007 in forum Visual Basic Programming
    Replies: 5
    Last Post: 04-18-2008, 07:35 PM
  3. All Strings ?
    By Teh Sasuke in forum Visual Basic Programming
    Replies: 2
    Last Post: 01-05-2008, 01:37 PM
  4. Delphi 7 for replacing detected CE strings??
    By jokuvaan11 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 07-02-2007, 03:34 AM
  5. String Theory
    By arunforce in forum General
    Replies: 8
    Last Post: 01-14-2007, 09:49 AM