class: CharacterArray
authorClaus Gittinger <cg@exept.de>
Tue, 14 Nov 2017 23:00:36 +0100
changeset 4528 844e085a7ac1
parent 4527 23d0c88c0679
child 4529 4c772a5f2516
class: CharacterArray comment/format in: #printf: #printf:on: #printfWith: #printfWith:with: #printfWith:with:with: #printfWith:with:with:with: #printf_formatArgCount
extensions.st
--- a/extensions.st	Wed Nov 08 07:14:58 2017 +0100
+++ b/extensions.st	Tue Nov 14 23:00:36 2017 +0100
@@ -370,7 +370,7 @@
     "Format and print the receiver with <args> formatted in C style,
      as specified in the Unix C-language manual page for printf(3).
      Return the resulting string (i.e actually, this is more like an sprintf).
-
+     For smalltalk specific formats, see documentation in PrintfScanf.
      For copyright information, see goodies/String-printf_scanf.chg"
 
     |aStream|
@@ -412,6 +412,8 @@
      Transcript show: '''%f%*f %8[A-F0-9]%c%d 0x%x%f'' sscanf: ''12.45 1048.73 AE40Z527 0x75BCD15 34'' = '.
      Transcript showCR: ('%f%*f %8[A-F0-9]%c%d 0x%x%f' sscanf: '12.45 1048.73 AE40Z527 0x75BCD15 34') printString.
     "
+
+    "Modified (comment): / 14-11-2017 / 22:58:01 / cg"
 ! !
 
 !CharacterArray methodsFor:'printing & storing'!
@@ -419,7 +421,7 @@
 printf:args on:outStream
     "Format and print the receiver on <outStream> with <args>
      formatted in C style, as specified in the Unix C-language manual page for printf(3).
-
+     For smalltalk specific formats, see documentation in PrintfScanf.
      For copyright information, see goodies/String-printf_scanf.chg"
 
     PrintfScanf printf:self on:outStream arguments: args
@@ -438,7 +440,7 @@
      '%10s%03d\n' printf:{ 'hello' . 12 } on:Transcript
     "
 
-    "Modified (comment): / 19-06-2017 / 15:51:57 / cg"
+    "Modified (comment): / 14-11-2017 / 22:57:58 / cg"
 ! !
 
 !CharacterArray methodsFor:'printing & storing'!
@@ -446,7 +448,8 @@
 printfWith:arg1
     "Format and print the receiver with <arg1> formatted in C style,
      as specified in the Unix C-language manual page for printf(3).
-     Return the resulting string (i.e actually, this is more like an sprintf)."
+     Return the resulting string (i.e actually, this is more like an sprintf).
+     For smalltalk specific formats, see documentation in PrintfScanf."
 
     ^ self printf:(Array with:arg1)
 
@@ -454,6 +457,8 @@
      ('%05x' printfWith:123)
      Transcript showCR:('%05x' printfWith:123)
     "
+
+    "Modified (comment): / 14-11-2017 / 22:58:10 / cg"
 ! !
 
 !CharacterArray methodsFor:'printing & storing'!
@@ -461,13 +466,16 @@
 printfWith:arg1 with:arg2
     "Format and print the receiver with <argI> formatted in C style,
      as specified in the Unix C-language manual page for printf(3).
-     Return the resulting string (i.e actually, this is more like an sprintf)."
+     Return the resulting string (i.e actually, this is more like an sprintf).
+     For smalltalk specific formats, see documentation in PrintfScanf."
 
     ^ self printf:(Array with:arg1 with:arg2)
 
     "
      Transcript showCR:('%d %05x' printfWith:123 with:234)
     "
+
+    "Modified (comment): / 14-11-2017 / 22:58:16 / cg"
 ! !
 
 !CharacterArray methodsFor:'printing & storing'!
@@ -475,13 +483,16 @@
 printfWith:arg1 with:arg2 with:arg3
     "Format and print the receiver with <argI> formatted in C style,
      as specified in the Unix C-language manual page for printf(3).
-     Return the resulting string (i.e actually, this is more like an sprintf)."
+     Return the resulting string (i.e actually, this is more like an sprintf).
+     For smalltalk specific formats, see documentation in PrintfScanf."
 
     ^ self printf:(Array with:arg1 with:arg2 with:arg3)
 
     "
      Transcript showCR:('%d %05x %08o' printfWith:123 with:234 with:345)
     "
+
+    "Modified (comment): / 14-11-2017 / 22:58:20 / cg"
 ! !
 
 !CharacterArray methodsFor:'printing & storing'!
@@ -489,13 +500,33 @@
 printfWith:arg1 with:arg2 with:arg3 with:arg4
     "Format and print the receiver with <argI> formatted in C style,
      as specified in the Unix C-language manual page for printf(3).
-     Return the resulting string (i.e actually, this is more like an sprintf)."
+     Return the resulting string (i.e actually, this is more like an sprintf).
+     For smalltalk specific formats, see documentation in PrintfScanf."
 
     ^ self printf:(Array with:arg1 with:arg2 with:arg3 with:arg4)
 
     "
      Transcript showCR:('%d %05x %08o %b' printfWith:123 with:234 with:345 with:123)
     "
+
+    "Modified (comment): / 14-11-2017 / 22:58:23 / cg"
+! !
+
+!CharacterArray methodsFor:'printing & storing'!
+
+printfWith:arg1 with:arg2 with:arg3 with:arg4 with:arg5
+    "Format and print the receiver with <argI> formatted in C style,
+     as specified in the Unix C-language manual page for printf(3).
+     Return the resulting string (i.e actually, this is more like an sprintf).
+     For smalltalk specific formats, see documentation in PrintfScanf."
+
+    ^ self printf:(Array with:arg1 with:arg2 with:arg3 with:arg4 with:arg5)
+
+    "
+     Transcript showCR:('%d %05x %08o %b' printfWith:123 with:234 with:345 with:123)
+    "
+
+    "Modified (comment): / 14-11-2017 / 22:58:28 / cg"
 ! !
 
 !CharacterArray methodsFor:'printing & storing'!
@@ -503,11 +534,13 @@
 printf_formatArgCount
     "Return the number of arguments required/produced if the receiver is interpreted
      as a printf/scanf format control string.
+     For smalltalk specific formats, see documentation in PrintfScanf.
      For copyright information, see goodies/String-printf_scanf.chg"
 
     ^ PrintfScanf formatArgCountFor:self.
 
     "Modified: / 19-06-2017 / 16:54:10 / cg"
+    "Modified (comment): / 14-11-2017 / 22:58:34 / cg"
 ! !
 
 !CharacterArray methodsFor:'private'!