admin
2025-01-22 7e31442f0e9b07764e9c6a9680d3d4aeba5fe1de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Quintiq file version 2.0
#parent: #root
StaticMethod GetBooleanBetweenDelimitor (
  String str,
  String delimitor
) declarative remote as Boolean
{
  Description: 'ViewData will contain a very long string. This function is to get the string between deliminator'
  TextBody:
  [*
    value := false;
    startdelimitor := '<' + delimitor + '>'
    enddelimitor := '</' + delimitor + '>'
    
    startpos := str.FindString( startdelimitor, 0 );
    if( startpos >= 0 )
    {
      endpos := str.FindString( enddelimitor, startpos );
      substring := str.SubString( startpos + startdelimitor.Length(),
                                  endpos - startpos - enddelimitor.Length() + 1 );
      value := [Boolean]substring;
    }
    return value;
  *]
}