LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 02-17-2009, 01:13 AM   #1
charlitos
Member
 
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 01:14 AM.
 
Old 02-17-2009, 02:49 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Wouldn't it be a bad homework assignment if there were a ready-made builtin function available?
 
Old 02-17-2009, 02:52 AM   #3
charlitos
Member
 
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.
 
  


Reply



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 12:19 AM
Public/Private Key Pairs Kissell Linux - Security 3 01-24-2009 04:36 AM
Converting pairs of images to pdf business_kid Linux - Software 4 10-30-2008 02:56 PM
Big Brother? Key Pairs? cwizardone Slackware 1 02-27-2007 06:02 PM
find repeated characters in a string mcshen Programming 9 02-02-2004 05:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:52 AM.

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