/// <summary> /// /// Does not currently support FOPs /// </summary> /// <param name="sym"></param> /// <returns></returns> public static string exDateStr(string sym) { string str = ""; int idx1 = Utl.pos_first_num(sym); int idx2 = Utl.pos_last_alpha(sym); if (sym.Length > 0 && idx1 != -1 && idx1 != -1) { str = sym.Substring(idx1, idx2 - idx1); } return(str); }
/// <summary> /// /// TODO: handle FOPs /// </summary> /// <param name="sym"></param> /// <returns></returns> public static string symbol(string sym) { string str = ""; int idx1 = Utl.pos_first_alpha(sym); int idx2 = Utl.pos_first_num(sym); if (idx2 == -1 && sym.Length < 6) { idx2 = Utl.pos_last_alpha(sym) + 1; } if (sym.Length > 0 && idx1 != -1 && idx1 != -1) { str = sym.Substring(idx1, idx2 - idx1); } return(str); }