663 {
664 int slot_index = -1;
665
667 {
668 string selection_component_lower = selection_component;
669 selection_component_lower.
ToLower();
670
672
673 if ( start > -1 )
674 {
676 int end = start + 2;
677 int length = selection_component.
Length();
678
679 if ( length >= end )
680 {
681 int length_add = length - end;
682 int length_from_end = 2 + length_add;
683 string num_str = selection_component.
Substring( start, length_from_end );
684 slot_index = num_str.
ToInt();
685
686 slot_index = slot_index - 1;
687 }
688 }
689 }
690
691 return slot_index;
692 }
ref array< ref Slot > m_Slots
static const string SLOT_MEMORY_POINT_PREFIX
proto native int Length()
Returns length of string.
proto native int ToInt()
Converts string to integer.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.
proto int ToLower()
Changes string to lowercase. Returns length.