Joined
Last Seen
0 Reputation Points
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 1
- Downvoting Members
- 2
0 Endorsements
Ranked #55.0K
~1K People Reached
Favorite Forums
Web Development x 2
2 Posted Topics
Re: PHP isn't strongly typed, making the function overload, as we are used, kinda senseless. In most languages that allow function overloading, you have to differentiate the several overloads by the parameters types. So there are some workarounds to do it in PHP. We can check the parameters (after setting default … | |
Re: [code=c]string *getTokens(string s, string separator) { unsigned int tokens, pos; tokens = 1; string temp, *r = NULL; temp = s; while((pos = temp.find(separator)) != string::npos) { tokens += 1; temp.replace(0, pos + separator.length(), ""); } r = new string[tokens + 1]; // add one extra element // and set … |
The End.