public static string GetCountryCode(string sCreditorID) { sCreditorID = SepaUtil.Trim(sCreditorID); if ((sCreditorID == null) || (sCreditorID == "")) { return(null); } if ((sCreditorID.Length < 8) || (sCreditorID.Length > 0x23)) { throw new ArgumentException(); } return(sCreditorID.Substring(0, 2)); }
public static string GetCountryCode(string sBIC) { sBIC = SepaUtil.Trim(sBIC); if ((sBIC == null) || (sBIC == "")) { return(null); } if (!IsValid(sBIC)) { throw new ArgumentException(); } return(sBIC.Substring(4, 2)); }
public static string GetCountryCode(string sIBAN) { sIBAN = SepaUtil.Trim(sIBAN); if ((sIBAN == null) || (sIBAN == "")) { return(null); } if ((sIBAN.Length < 6) || (sIBAN.Length > 0x22)) { throw new ArgumentException(); } return(sIBAN.Substring(0, 2)); }
public static string Capture(string sCreditorId) { sCreditorId = SepaUtil.Trim(sCreditorId); if ((sCreditorId == null) || (sCreditorId == "")) { return(null); } sCreditorId = sCreditorId.ToUpper(CultureInfo.InvariantCulture); StringBuilder builder = new StringBuilder(0x23); for (int i = 0; i < sCreditorId.Length; i++) { char ch = sCreditorId[i]; if (((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch <= 'Z'))) { builder.Append(ch); } } return(builder.ToString()); }
public static string Capture(string sBIC) { sBIC = SepaUtil.Trim(sBIC); if ((sBIC == null) || (sBIC == "")) { return(null); } sBIC = sBIC.ToUpper(CultureInfo.InvariantCulture); StringBuilder builder = new StringBuilder(11); for (int i = 0; i < sBIC.Length; i++) { char ch = sBIC[i]; if (((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch <= 'Z'))) { builder.Append(ch); } } return(builder.ToString()); }
public static string Capture(string sPaperIBAN) { sPaperIBAN = SepaUtil.Trim(sPaperIBAN); if ((sPaperIBAN == null) || (sPaperIBAN == "")) { return(null); } sPaperIBAN = sPaperIBAN.ToUpper(CultureInfo.InvariantCulture); if (sPaperIBAN.StartsWith("IBAN")) { sPaperIBAN = sPaperIBAN.Substring(4); } StringBuilder builder = new StringBuilder(0x22); for (int i = 0; i < sPaperIBAN.Length; i++) { char ch = sPaperIBAN[i]; if (((ch >= '0') && (ch <= '9')) || ((ch >= 'A') && (ch <= 'Z'))) { builder.Append(ch); } } return(builder.ToString()); }