721 {
722 int slot_index = -1;
723
725 {
726 string selection_component_lower = selection_component;
727 selection_component_lower.
ToLower();
728
730
731 if ( start > -1 )
732 {
734 int end = start + 2;
735 int length = selection_component.
Length();
736
737 if ( length >= end )
738 {
739 int length_add = length - end;
740 int length_from_end = 2 + length_add;
741 string num_str = selection_component.
Substring( start, length_from_end );
742 slot_index = num_str.
ToInt();
743
744 slot_index = slot_index - 1;
745 }
746 }
747 }
748
749 return slot_index;
750 }
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.