2026-03-27 09:40:26 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| 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()
|
| | | {
|
| | | //---
|
2026-04-30 15:56:25 -05:00 | | | Print(CSimpleStringMatch::SimpleMatchInString("hi.png", "hi.png")); // true
|
2026-03-27 09:40:26 -05:00 | | | 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
|
2026-04-30 15:56:25 -05:00 | | | Print(CSimpleStringMatch::SimpleMatchInString("j721384abc888888def", "*abc*def")); // true
|
2026-09-02 15:54:33 -05:00 | | | Print(CSimpleStringMatch::SimpleMatchInString("File\\Path\\Join\\", "*\\")); // true
|
| | | Print(CSimpleStringMatch::SimpleMatchInString("File\\Path\\Join\\", "~\\")); // false
|
| | | Print(CSimpleStringMatch::SimpleMatchInString("data_importante.txt.enc", "*.txt.enc"));
|
2026-03-27 09:40:26 -05:00 | | | }
|
| | | //+------------------------------------------------------------------+
|