//This code is copyright Andrew Story (Kaslai/Aslai) All rights reserved.
//This and derivative works can be distributed as seen fit,
//so long as this notice remains unchanged and present

#pragma once

#include <map>
#include <string.h>
#include <ctype.h>
#include "global/stdinc.h"

struct map_char{
    bool operator()(const char* str1, const char* str2) const
    {
        if( (int)str1 > 1000 && (int)str2 > 1000 )
        return strcmp( str1, str2 ) > 0 ;
        else return 1;
        bool match = false;
        for( int i = 0; str1[i] != 0 && str2[i] != 0; i ++ ){
            char a = tolower( str1[i] );
            char b = tolower( str2[i] );
            if( a == 0 && b == 0 ) break;
            if( a == '\\' ) a = '/';
            if( b == '\\' ) b = '/';

            if( a != b ){
                match = true;
                break;
            }
        }

        return match;
    }
};
struct map_int{
    bool operator()(int in1, int in2) const
    {
        return (in1 < in2);
    }
};