There is String.Format
function that is referred to in the documentation as the analog for Format
function from VB6. There's also Format
function from VisualBasic
namespace that is provided for compatibility and basically has same powers as String.Format
.
Indeed, those two format dates and numbers.
But VB6's function was also able to format strings:
? format$("hi there", ">")
HI THERE
? format$("hI tHeRe", "<")
hi there
? format$("hi there", ">!@@@... not @@@@@")
HI ... not THERE
String.Format
is not able to do that, as far as I'm concerned, nor is the new Format
. I also couldn't find any mention in the compatibility Format
documentation that certain parts of VB6 functionality is lost, seems like the feature was deprecated "silently."
Is there anything in the framework that can do this type of formatting?