mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make scriptability a CAF-feature
This commit is contained in:
@@ -55,17 +55,3 @@ QString RiaTextStringTools::trimAndRemoveDoubleSpaces( const QString& s )
|
||||
|
||||
return trimmed;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaTextStringTools::camelToSnakeCase( const QString& camelString )
|
||||
{
|
||||
static QRegularExpression re1( "(.)([A-Z][a-z]+)" );
|
||||
static QRegularExpression re2( "([a-z0-9])([A-Z])" );
|
||||
|
||||
QString snake_case = camelString;
|
||||
snake_case.replace( re1, "\\1_\\2" );
|
||||
snake_case.replace( re2, "\\1_\\2" );
|
||||
return snake_case.toLower();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user