Author Topic: CAPITAL <-> LOWERCASE  (Read 2090 times)

0 Members and 1 Guest are viewing this topic.

Offline MANOS

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
CAPITAL <-> LOWERCASE
« on: 14 December, 2004, 03:55:27 »
Hi,

In order to finish one script of mine, I need to know how I can make the program to treat capital and lowercase letters as the same. For example: WoRd == word == WorD etc

Please help me if you can.
Thank you.

PtokaX forum

CAPITAL <-> LOWERCASE
« on: 14 December, 2004, 03:55:27 »

Offline VidFamne

  • Triple Ace
  • **
  • Posts: 173
  • Karma: +2/-0
(No subject)
« Reply #1 on: 14 December, 2004, 09:01:06 »
with; strlower(s) or strupper(s)
look >>HERE<<

Offline MANOS

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
YOU SAVED ME
« Reply #2 on: 14 December, 2004, 12:48:47 »
Thank you very much VidFamne.  :)
But still I can't understand the usage of strupper(s,n). I had tried to use this, but nothing happened. Could u give me an example with this command?
Thanks again. :)

Herodes

  • Guest
(No subject)
« Reply #3 on: 14 December, 2004, 15:21:30 »
there isnt any strupper(string, number) in lua ... the documentation shows that there is a strrep(string, number)..

 strrep (s, n)
Returns a string that is the concatenation of n copies of the string s.

Example :

strrep("ho ", 3).." !!! Merry Christmas!"

returns

"ho ho ho  !!! Merry Chistmas!"
« Last Edit: 14 December, 2004, 15:22:11 by Herodes »

Offline VidFamne

  • Triple Ace
  • **
  • Posts: 173
  • Karma: +2/-0
(No subject)
« Reply #4 on: 14 December, 2004, 17:13:28 »
And;  strupper("Ho,hO,ho").." !!! Merry Christmas!"
returns
HO,HO,HO !!! Merry Christmas!
while; strlower("Ho,hO,ho").." !!! Merry Christmas!"
returns
ho,ho,ho !!! Merry Christmas!

Offline MANOS

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
(No subject)
« Reply #5 on: 15 December, 2004, 01:45:17 »
Thank you both. :) Now I learn 3 more commands in lua. :-P
Also I had realized that I was reading the wrong manual. :-P I thought that PtokaX version 0.3.3.0 was supporting lua 5. But obviously I was wrong. Thanks again. :)

PtokaX forum

(No subject)
« Reply #5 on: 15 December, 2004, 01:45:17 »