Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-29-2001, 03:00 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
Changing case in strings

~AlphaFlame~

How would one go about changing the case of letters in a string? Say you have a string "this.letters" being set letter by letter... and you want certain letters to be capitalized. Script example:

if (playerchats){
for (this.i=0;this.i<strlen(#c);this.i++){
if (!strequals(#e(this.i+3,1,#c),h)){
setstring letters,#s(letters) #e(this.i+3,1,#c);
} else {
setstring letters,#s(letters) capitlization thing here;
}
}

Now, lets say I wanted all the H's to be capitalized. How would I go about doing that where the blue text is? My idea was to use the new ascii command, and add/subtract the correct value from lowercase to uppercase, but then I'd need to know how to check the ascii of that particular letter...

Hopefully you people can understand that :o
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
 


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


All times are GMT +2. The time now is 06:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.