[INC] String Stocks
1 Attachment(s)
String Stocks
Version 0.0.6 by Exolent Intro: Ever needed some kind of fancy manipulation for a string that wasn't already available? With these stocks, you will be able to do almost anything you could want with strings! Functions: Code:
is_str_empty(const string[]) See string_stocks.inc. The forum likes to replace tab characters with 4 spaces, and it just makes it look ugly on here. Changelog: Version 0.0.6 - Added html_encode() and html_decode(). Version 0.0.5 - Added parse_color(). Version 0.0.4 - Fixed infinite loop in str_substr_count(). Version 0.0.3 - Several code fixes - Added str_implode_str() to documentation (it was missing in comments and in post but function existed) - Added trim[] and ignorecase parameters for str_ltrim() and str_rtrim(). - Added str_trim() function. Version 0.0.2 - Added is_char(), is_char_upper(), is_char_lower(), str_uriencode(), str_uridecode(), is_str_upper(), is_str_lower(), regex_escape(). Version 0.0.1 - Initial release Have any problems? Want a new function added? Speak up! I'll try to help as much as I can and am willing to add new string features as long as they're relevant (meaning I'm not adding a function which copies "hi" into a string). |
Re: [INC] String Stocks
Very useful (y).
Thanks :). pd:add str_to_url(? @EDIT other stock PHP Code:
|
Re: [INC] String Stocks
Good job. It'll probably be useful to a lot of people, but sadly, I don't know what I would use these for :(
|
Re: [INC] String Stocks
@Destro: Your example has nothing to do with URLs.
Quote:
|
Re: [INC] String Stocks
Quote:
I have to do an English course :S |
Re: [INC] String Stocks
Quote:
|
Re: [INC] String Stocks
Updated to Version 0.0.2
Quote:
|
Re: [INC] String Stocks
I'm sure some of these will come in handy when parsing files in the future.
Good job |
Re: [INC] String Stocks
Got this idea from here.
str_charcount( szString[ ], character ) Returns the amount of times the character is present in a certain string. |
Re: [INC] String Stocks
str_substr_count() is for that.
|
All times are GMT -4. The time now is 08:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.