int QgsExpression::functionIndex( QString name ) { int count = functionCount(); for ( int i = 0; i < count; i++ ) { if ( QString::compare( name, BuiltinFunctions()[i].mName, Qt::CaseInsensitive ) == 0 ) return i; } return -1; }
int QgsExpression::functionIndex( const QString &name ) { int count = functionCount(); for ( int i = 0; i < count; i++ ) { if ( QString::compare( name, QgsExpression::Functions()[i]->name(), Qt::CaseInsensitive ) == 0 ) return i; const QStringList aliases = QgsExpression::Functions()[i]->aliases(); for ( const QString &alias : aliases ) { if ( QString::compare( name, alias, Qt::CaseInsensitive ) == 0 ) return i; } } return -1; }