Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>freplicate() - replicate a string to a file</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     freplicate() - replicate a string to a file
  Usage:    <integer> = freplicate(<handle>,<string>,<numtimes>)
  Params:   integer <handle> from a previous fopen() or fcreate()
            string <string> - the string to replicate
            integer <numtimes> - how many times to replicate <string>
  Returns:  integer equal to the number of times the string was
            written to the file. If this number is less than
            <numtimes>, then an error occurred.

 ---------------------------------- Example ---------------------------------

                 handle = fopen("test.txt")
                 freplicate(handle,"This is a string",100)
                 fclose(handle)

  Note:     If you specify a null string (""), then no characters
            are written to the file. If you want to write nulls to
            the file, use chr(0) instead.


See Also: fwriteline() fwritebyte() ferror()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson