#Major . Posted June 16, 2018 Share Posted June 16, 2018 كيف اقدر اشيل المسافات من متغير؟ Link to comment
#Major . Posted June 16, 2018 Author Share Posted June 16, 2018 " " عندي متغير بدايته مسافات او سبيس او فراغات الي تحب ابي اشيل الي بالبداية بس؟ Link to comment
Abdul KariM Posted June 16, 2018 Share Posted June 16, 2018 myString = "H o w A r e Y o u " repStr = string.gsub( myString , " ", "") print ( repStr ) Link to comment
#Major . Posted June 16, 2018 Author Share Posted June 16, 2018 شكرا لك لكن م فيه طريقة اخليه يشيل الفراغات الاولى فقط؟ Link to comment
#Major . Posted June 16, 2018 Author Share Posted June 16, 2018 خلاص شكرا حليتها 1 minute ago, Abdul KariM said: يعني بداية النص ؟ يب Link to comment
Abdul KariM Posted June 16, 2018 Share Posted June 16, 2018 myString = " How Are You" repStr = string.sub ( myString,2 ) print ( repStr ) طبعا لو فيه اكثر من مسافة ببداية السترنق غير رقم 2 ل 3 او 4 ع حسب المسافات 1 Link to comment
Rockyz Posted June 16, 2018 Share Posted June 16, 2018 local s = 'v a l a l' local k = 2 print(s:gsub('%s', '', k)) 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now