Ran across my old code... Must have been tired...
-
public static string Maximum( this string input, int max ) {
if ( input != null && input.Length > 0 ) {
if ( input.Length > max ) {
return input.Substring( 0, max );
}
return input.Substring( 0, input.Length ); //wtf have i done...
}
return input;
}:wtf:
“I have no special talents. I am only passionately curious.” - Albert Einstein
-
public static string Maximum( this string input, int max ) {
if ( input != null && input.Length > 0 ) {
if ( input.Length > max ) {
return input.Substring( 0, max );
}
return input.Substring( 0, input.Length ); //wtf have i done...
}
return input;
}:wtf:
“I have no special talents. I am only passionately curious.” - Albert Einstein
-
public static string Maximum( this string input, int max ) {
if ( input != null && input.Length > 0 ) {
if ( input.Length > max ) {
return input.Substring( 0, max );
}
return input.Substring( 0, input.Length ); //wtf have i done...
}
return input;
}:wtf:
“I have no special talents. I am only passionately curious.” - Albert Einstein