Selerix Developer Tools
StripNonNumericWithinLength Method






Selerix.Foundation Assembly > Selerix.Foundation.Data Namespace > Utils Class : StripNonNumericWithinLength Method
String that may contain characters that should be ignored
Max length of result
Position of the last checked character from input
Utility function that removes all non numeric from input string and returns result. Also check length of result and if it bigger than withingLength, returns position of last character from result in input string. Used for check max length of SSN\ZIP\PHONE
Syntax
'Declaration
 
Public Shared Function StripNonNumericWithinLength( _
   ByVal strIN As String, _
   ByVal withingLength As Integer, _
   ByRef checkedLength As Integer _
) As String
'Usage
 
Dim strIN As String
Dim withingLength As Integer
Dim checkedLength As Integer
Dim value As String
 
value = Utils.StripNonNumericWithinLength(strIN, withingLength, checkedLength)
public static string StripNonNumericWithinLength( 
   string strIN,
   int withingLength,
   out int checkedLength
)
public function StripNonNumericWithinLength( 
    strIN: String;
    withingLength: Integer;
   Out  checkedLength: Integer
): String; static; 
public static function StripNonNumericWithinLength( 
   strIN : String,
   withingLength : int,
   checkedLength : int
) : String;
public: static string* StripNonNumericWithinLength( 
   string* strIN,
   int withingLength,
   [PARAMFLAG::Out] int checkedLength
) 
public:
static String^ StripNonNumericWithinLength( 
   String^ strIN,
   int withingLength,
   [Out] int checkedLength
) 

Parameters

strIN
String that may contain characters that should be ignored
withingLength
Max length of result
checkedLength
Position of the last checked character from input

Return Value

Result string
See Also

Reference

Utils Class
Utils Members