Jump to content

[TUT] Lua Strings


Walid

Recommended Posts

Posted

Thank you dude that's what exactly i wanted :D

"When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag"

"Have confidence in yourself, no problem is impossible in life"

Posted
Thank you dude that's what exactly i wanted :D
Great job, also add string.count and string.explode usefull functions contributed by Mta users.

These "useful functions" are rather useless now, as for they can both be done with MTAs default split function

You're doing well , sir Walid good job .

Thx guys.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted

I found a mistake in

5. Formatting string

-- Date Format

local date = 3

local month = 2

loal year = 2020

outputChatBox(string.format("Date %02d/%02d/%03d", date, month, year)) -- Result: Date 03/02/2020

Posted
Another good tutorial by you, good job!
Good Job :]

Thx Guys hope it helps.

I found a mistake in

5. Formatting string

-- Date Format

local date = 3

local month = 2

loal year = 2020

outputChatBox(string.format("Date %02d/%02d/%03d", date, month, year)) -- Result: Date 03/02/2020

'C' fixed, thx .

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
Good tut,gj & keep the good job up
Thank you for tutorial, I have learned more about strings :)

Thanks.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
and Another good tutorial keep it up

thank you

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

  • 2 weeks later...
Posted

A good addition to this tutorial would be to teach people how to manipulate strings using regular expressions.

For example, this can be used to find a URL. This is very useful in case you need to download XHTML files from a website and read through it in order to find a URL.

local string1 = "https://forum.multitheftauto.com/posting.php?mode=reply&f=148&t=88427" 
local findURL = string.match(string1, "http?://[%w-_%.%?%.%+=&]+") 
print(findURL) -- Prints "https://forum.multitheftauto.com/posting.php?mode=reply&f=148&t=88427" 

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

It's good that you make tutorials so more people could learn Lua faster, good job Walid.

  • "Lua" means "Moon" in Portuguese. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!

- http://www.lua.org/about.html

Posted
It's good that you make tutorials so more people could learn Lua faster, good job Walid.

thx :)

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

  • 6 months later...
Posted

Good job.

thx

only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله

  • 2 months later...
Posted
What a nice and good-looking tutorial, mate! Two thumbs up!

thx

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...