Added String::replaceAll() and String::replace() for String type.

Added Action::on().

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2019-11-14 16:15:09 -03:00
parent fce51fc4d1
commit c84d528ae4
4 changed files with 32 additions and 0 deletions

View File

@@ -171,9 +171,15 @@ class EE_API String {
/** Replace all occurrences of the search string with the replacement string. */
static void replaceAll( std::string &target, const std::string& that, const std::string& with );
/** Replace all occurrences of the search string with the replacement string. */
static void replaceAll( String &target, const String& that, const String& with );
/** Replace the first ocurrence of the search string with the replacement string. */
static void replace( std::string& target, const std::string& that, const std::string& with );
/** Replace the first ocurrence of the search string with the replacement string. */
static void replace( String& target, const String& that, const String& with );
/** Removes the numbers at the end of the string */
static std::string removeNumbersAtEnd( std::string txt );

View File

@@ -50,6 +50,8 @@ class EE_API Action {
Uint32 addEventListener( const ActionType & actionType, const ActionCallback & callback );
Action * on( const ActionType & actionType, const ActionCallback & callback );
void removeEventListener( const Uint32 & callbackId );
void sendEvent( const ActionType & actionType );