chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 25 Jul 2015 05:34 PM |
Challenge = String reverse
Dificulty = mtn dew
Language = Lua
Restrictions = No string.sub or string.gmatch
Reward = 10 points
Bringing HTML up on this thread for ANY reason auto fails the challenge for you.
Begin. |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 25 Jul 2015 05:36 PM |
lolwat..
local str = 'Hello';
print(str:reverse()); |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2015 05:36 PM |
| print(string.reverse("mtn dew")) |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 25 Jul 2015 05:36 PM |
| string.reverse("get rekt") |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2015 05:37 PM |
Lol chim get rekt by a string library function.
Challenge Auto Ruined |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 25 Jul 2015 05:38 PM |
print(string.reverse("!uoy evol I ,cimmihC iH"))
Output: Hi Chimmic, I love you!
Is that good?
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2015 05:40 PM |
| Even though this challenge was a fail, they are fun! Make more. |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 25 Jul 2015 05:41 PM |
i will be the only one to fail this challenge:
"You Made A Typo In Your Forum You Meant Html Challenge!!!!!!!!!!!!!!!!!!!!!!!!!!!" |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 25 Jul 2015 05:43 PM |
| I didn't think I would have to explain that the challenge was to create your own function.... |
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 25 Jul 2015 05:43 PM |
| @Quin, yes, these challenges are fun, even though some people create flaws in their challenges ;D |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 25 Jul 2015 05:49 PM |
local str = 'ttoh gnikcuf si metsluoG'; local string = setmetatable({},{__index = string;});
string.flip = function(s) local new = {}; for i = 1,#s do a = i -1; new[#new+1] = s:sub(#s-a,#s-a); end return table.concat(new,''); end
print(string.flip(str)); |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 25 Jul 2015 05:50 PM |
| 10 points for me?? Any extra since I added it to the string librari? c; |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2015 05:52 PM |
Okay @chim
My own function:
function R(s)return s:reverse()end
lol |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 25 Jul 2015 05:52 PM |
@ goulstem
No string.sub or string.gmatch
You failed
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
| |
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 25 Jul 2015 06:00 PM |
this is too hard i quit
"Talk is cheap. Show me the code." - Linus Torvalds |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 25 Jul 2015 06:04 PM |
local str = 'ttoh gnikcuf si metsluoG'; local string = setmetatable({},{__index = string;});
string.flip = function(s) local new = {}; for i = 1,#s do a = i -1; new[#new+1] = string["sub"](s,#s-a,#s-a); end return table.concat(new,''); end
print(string.flip(str));
pls |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2015 06:05 PM |
print(string.sub == string["sub"]) >true
u fail challenge |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 25 Jul 2015 06:06 PM |
print(MakerModelLua == nil) > true
nob ;c |
|
|
| Report Abuse |
|
|
Goulstem
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 7177 |
|
|
| 25 Jul 2015 06:18 PM |
| I'm still working on this.. war shall not win. |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
|
| 25 Jul 2015 06:44 PM |
pastebin.com/m7i9UNyv
my code was breaking some kind of ROBLOX rule so |
|
|
| Report Abuse |
|
|
bohdan77
|
  |
| Joined: 10 Aug 2008 |
| Total Posts: 7944 |
|
| |
|