String formatting functions...

Results 1 to 4 of 4

Thread: String formatting functions...

  1. #1
    Nils Kaiser Guest

    Default String formatting functions...

    I&#039m searching for a jscript function like the c one "sprintf"...<BR>Can someone help?

  2. #2
    Dan Evans Guest

    Default What does sprintf do?

    For the benefit on non C people, what does sprintf do?

  3. #3
    Nils Kaiser Guest

    Default RE: What does sprintf do?

    sprintf is a C function used to build strings by using placeholders that will be replaced by values stored in varibales:<BR><BR>char DateBuffer[100];<BR>sprintf(DateBuffer, "Today is %i/%i/%i", DateMonth, DateDay, DateYear);<BR><BR>I am looking for a similar jscript function... but not only for date strings.

  4. #4
    Dan Evans Guest

    Default RE: Why not just use concatenation?

    Why not just concatenate the data you want into a string?<BR><BR>var DateBuffer = "Today is " + DateMonth + "/" + DateDay + "/" + DateYear;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts