| //+------------------------------------------------------------------+
|
| //| Test.mq5 |
|
| //| Copyright 2026, MetaQuotes Ltd. |
|
| //| https://www.mql5.com |
|
| //+------------------------------------------------------------------+
|
| #property copyright "Copyright 2026, MetaQuotes Ltd."
|
| #property link "https://www.mql5.com"
|
| #property version "1.00"
|
| #property strict
|
|
|
| //+------------------------------------------------------------------+
|
| //| |
|
| //+------------------------------------------------------------------+
|
| #include "StrSimpleMatch.mqh"
|
|
|
| //+------------------------------------------------------------------+
|
| //| Script program start function |
|
| //+------------------------------------------------------------------+
|
| void OnStart()
|
| {
|
| //---
|
| Print(CSimpleStringMatch::SimpleMatchInString("hi.png", "hi.png")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("hello_word.png", "*.png")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("hello_word.png", ".png*")); // false
|
| Print(CSimpleStringMatch::SimpleMatchInString("aksdgello", "????gello")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("123a", "*^^^a")); // false
|
| Print(CSimpleStringMatch::SimpleMatchInString("hello_word.png1", "*.png^")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("file123.txt", "file^^^.txt")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("file12.txt", "file^^^.txt")); // false
|
| Print(CSimpleStringMatch::SimpleMatchInString("anything", "*")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("", "*")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("hello_word.png1x", "*.png^")); // false
|
| Print(CSimpleStringMatch::SimpleMatchInString("hello_word.png12", "*.png^")); // false
|
| Print(CSimpleStringMatch::SimpleMatchInString("j721384abc888888def", "*abc*def")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("File\\Path\\Join\\","*\\")); // true
|
| Print(CSimpleStringMatch::SimpleMatchInString("File\\Path\\Join\\","~\\")); // false
|
| }
|
| //+------------------------------------------------------------------+
|