sprintf simple realization in JScript
JScript has no strict types thus this realization does not support C library
has only field width and alignment capabilities implemented. Example sprintf("A=%20l,B=%30r","Blah
Blah",234.56) will generate string with % escapes replaced with 20 and 30
characters wide fields containing: 1-st "Blah Blah" left aligned in the field
and 2-nd 234.56 right aligned. Also it supports a little type conversion excapes
but their purpose is to specify the type of the printed value. Genraal format
width - optional integer field width in characters. Only the resulting
string is formatted!
type - type to convert to. Can be f - convert to float or n
- convert to integer.
alignment - Alignment in the field (as specified by width). Can be l
- left, r - right, c - center. If width is not specified the
letter used is not meaningful.
Click the image below to download (sprintf.js-code)
click here ...
UNIX OS-es have some good utilities for file preprocessing based on
regular expressions, but Microsoft Windows does not. But Microsoft Windows has powerful scripting
engines and WSH thus the problem can be solved.
This script is able to process files described by the command line parameters
and replace some texts in them. It supports directory tree recursing, matching
file names with regular expression, processing parts of the files files
depending on the begin-end statements (defined by reg. exps. too) and so on.
Please note! You must be familiar with the JScript regular expressions in order
to use this utility. Wrong usage may cause loss of data thus it is recommended to
test it over some not important files first.
Also download the JScript documentation from the Microsoft site and see Regular Expression
object for the regular expressions syntax.
click here ...
With ASP Compiler (ASPC) ASP pages, WSH scripts and scripts for another scripting hosts can be converted to COM DLL. It supports fully VBScript 5.0 inlcuding classes. Compatible with any ASP host, can be configured for specific scripting environment.
shareware and freeware download archive updated daily
Suggest this page to the other visitors. Click the button below to place this page in the list above .