Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Removing Characters...
kvarnerexpress
post Feb 28 2006, 01:30 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



From the environment variables, i get the domain of the referring site using SERVER_NAME. The includes www. and i have to remove that. I dont believe there is a variable in the environment that contains only the domain.

So I would need to replace each character in the char* string by "" until i hit a '.' then replace the dot with "" and get the remaining string. Here is the catch. I can't include big headers because i need the file to stay really small around 20-30kb. So ideally, would need to use functions in stdlib.h stdio.h or string.h to get this done.

Thanks in advance
Go to the top of the page
 
+Quote Post
kvkv
post Mar 2 2006, 10:44 AM
Post #2


Newbie [Level 3]
***

Group: Members
Posts: 40
Joined: 29-January 06
Member No.: 17,841



Here is an easy solution for your problem.

CODE

{servenv++;}while((*servenv)!='.'); //increment char* till next character to '.'
//use servenv here. it points to next character of the first '.'

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Sonic Style Characters/drawing Requests(2)
  2. Super Smash Bros Melee(39)
  3. Things To Know About Dreams(1)
  4. Converting Textarea Return Characters To <br />(9)
  5. Unable To Renew Ip Address Or Connect To Internet After Broadband Software Uninstall(6)
  6. DNS Hijack SearchAtHand.com Browser Result Removal(6)
  7. A Small Html Problem(4)
  8. Who's Your All Time Favourite Hidden Characters?(3)
  9. Special Characters In The Web Address(0)
  10. Favorite Video Games Characters(1)
  11. Special Case Characters.(0)
  12. Validation Script - Detecting Illegal Characters(0)
  13. Site Displays Weird Characters Instead Of Site(6)
  14. Testing čćžđš Utf-8 Characters :)(4)
  15. Problem Removing Folder On Ftp(6)
  1. Removing My Qupis Account And Restoring Hosting By Trap17.com Addless Hosting(5)
  2. Firefox 2.x.x Removing Tab Scroller(3)
  3. Vb6 And Unicode(0)
  4. Boston Hoax - Marketing Stunt Gone Wrong(3)
  5. Mega64(4)
  6. Php Escaped Control Characters And Windows(3)
  7. Character Profiles (because I'm Bored And Thinking About Them)(0)
  8. Removing Warts Methods(10)
  9. Minimum Characters In Posts(12)
  10. Integerate Your Site With Talking Characters - Ms Agents(7)
  11. Converting Characters In A Variable To Individual Values In An Array(2)
  12. Final Fantasy 9 Renaming Characters(8)
  13. Manual Virus Removing And Security.(0)
  14. Title Attribute(5)
  15. Isolating Integers From Characters?(4)


 



- Lo-Fi Version Time is now: 7th October 2008 - 03:32 PM