StonehearthEditor.FilePreview.getLocKey C# (CSharp) Method

getLocKey() private method

Returns the localisation key at position position.
private getLocKey ( int position ) : string
position int Position that should be queried.
return string
        private string getLocKey(int position)
        {
            if (this.getIndicatorAt(position) != kI18nIndicator)
                return null;

            var indicator = this.mI18nIndicator;
            var startPos = indicator.Start(position);
            var endPos = indicator.End(position);
            var locKey = this.textBox.GetTextRange(startPos, endPos - startPos);
            var i18nLength = "i18n(".Length;
            return locKey.Substring(i18nLength, locKey.Length - i18nLength - 1);
        }