Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-17-2009, 02:13 AM   #1
Registered: Feb 2009
Posts: 51

Rep: Reputation: 16
Question Getting the no repeated pairs out of a a string

Is there any command in C(no c++) that takes a string as a parameter and returns a string with the no repeated pairs.

for instance

the string : teststring, should return

te es st ts tr ri in ng

instead of

te es st ts st tr ri in ng

the spaces are just for illustrative purpose and to get the idea of what Im trying to get here.

thanks in advance.

Last edited by charlitos; 02-17-2009 at 02:14 AM.
Old 02-17-2009, 03:49 AM   #2
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 110Reputation: 110
Wouldn't it be a bad homework assignment if there were a ready-made builtin function available?
Old 02-17-2009, 03:52 AM   #3
Registered: Feb 2009
Posts: 51

Original Poster
Rep: Reputation: 16
That assignment has kept me up for 3 days now, thats just the foundation so I thought there might be some way to do it easier, basically cause my prof has been insisting, asking us to include these and those libraries. So i was wondering.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Linux pseudo terminal pairs bytehunter Linux - General 12 03-03-2009 01:19 AM
Public/Private Key Pairs Kissell Linux - Security 3 01-24-2009 05:36 AM
Converting pairs of images to pdf business_kid Linux - Software 4 10-30-2008 03:56 PM
Big Brother? Key Pairs? cwizardone Slackware 1 02-27-2007 07:02 PM
find repeated characters in a string mcshen Programming 9 02-02-2004 06:43 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration