Difference between revisions of "User talk:Ugleh Ulrik"
Ugleh Ulrik (talk | contribs) |
|||
Line 10: | Line 10: | ||
,thanks | ,thanks | ||
<b>--</b>[[File:Uglehsig.png|53px|link=User:Ugleh_Ulrik]]([[User_talk:Ugleh_Ulrik|talk]]) 06:43, 31 May 2010 (UTC) | <b>--</b>[[File:Uglehsig.png|53px|link=User:Ugleh_Ulrik]]([[User_talk:Ugleh_Ulrik|talk]]) 06:43, 31 May 2010 (UTC) | ||
:Yeah the search can be a pain. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 17:41, 31 May 2010 (UTC) |
Revision as of 09:41, 31 May 2010
Stristr
I don't know what came over me but I totally rewrote Stristr. It makes a good example but it shouldn't be used as a user function. The programmer already knows at compile time if the string is going to be empty and if they want the before or after value. In most cases you won't be working with null strings and you will want the one string or the other but never will it change during execution. This means if you created a specialized function for each case, each function would be about 3 lines of code. It's better IMHO to inline three lines of code and cement understanding then to create a function to do it for you.
I also added comments. I removed the example and func_footnote because it was the wrong way to do existence checking. -- Strife (talk|contribs) 06:17, 31 May 2010 (UTC)
I knew someone was going to write it better, because I knew there was a different way then to use lists, seeing as a paragraph would probably waist memory, and was hoping for you or someone to edit it, the reason i made Stristr is because i used the same php function recently, and decided to import it into SL.
I just rechecked, and I was looking for a llSubStringIndex, i swear i searched for it and couldn't find it, i must of searched the wrong thing -.- ,thanks --(talk) 06:43, 31 May 2010 (UTC)