Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisione Revisione precedente
hollywoodlibs:helpers:bufferedstring [2019/02/12 09:26]
admin [BufferedString Object]
hollywoodlibs:helpers:bufferedstring [2019/02/12 09:43] (versione attuale)
admin
Linea 13: Linea 13:
   * BufferedStringObj:​PrepareForRead() **Added in v1.6**   * BufferedStringObj:​PrepareForRead() **Added in v1.6**
   * BufferedStringObj:​Read() **Added in v1.6**   * BufferedStringObj:​Read() **Added in v1.6**
-  * BufferedStringObj:​Set() **Added in v1.6**+  * BufferedStringObj:​Set() ** Added in v1.6**
  
  
Linea 23: Linea 23:
   BSObject = HL.BufferedString:​New()   BSObject = HL.BufferedString:​New()
  
-Create a new buffered string object.+Create a new empty buffered string object.
  
 __OUTPUT__ __OUTPUT__
Linea 34: Linea 34:
  
 ===== HL.BufferedString:​AddChar(char) ===== ===== HL.BufferedString:​AddChar(char) =====
-  ​HL.BufferedString:​AddChar(char)+  ​BSObject:​AddChar(char)
  
 Add the character '​char'​ to the buffered string object. Add the character '​char'​ to the buffered string object.
Linea 40: Linea 40:
 __INPUT__ __INPUT__
   * <color #​008800>​char</​color>​ : The character string to add to the buffered string object   * <color #​008800>​char</​color>​ : The character string to add to the buffered string object
 +
 +----
 +===== HL.BufferedString:​AddString(string) =====
 +  BSObject:​AddString(string)
 +
 +Add the string '​string'​ at the end of the buffered string.
 +
 +__INPUT__
 +  * <color #​008800>​string</​color>​ : The string to add at the end of the buffered string
  
 ---- ----
  \\  \\
 ===== HL.BufferedString:​Get() ===== ===== HL.BufferedString:​Get() =====
-  ​HL.BufferedString:Get()+  ​BSObject:Get()
  
 Returns the current contents of the buffered string object. Returns the current contents of the buffered string object.
Linea 50: Linea 59:
 __OUTPUT__ __OUTPUT__
   * <color #​008800>​contents</​color>​ : Current buffered string contents.   * <color #​008800>​contents</​color>​ : Current buffered string contents.
 +
 +----
 + \\
 +===== HL.BufferedString:​PrepareForRead() =====
 +  BSObject:​PrepareForRead()
 +
 +Whenever you need to read in the middle of the buffered string with the :Read() method you need to call this method to prepare the buffered string to be read.
 +
 +----
 + \\
 +===== HL.BufferedString:​Read(start,​ length) =====
 +  string = BSObject:​Read(start,​ length)
 +
 +This method allow to read in the middle of the buffered string: starting from character number '​start',​ this method will return a string of length equal to the specified '​length'​.
 +
 +__INPUT__
 +  * <color #​008800>​start</​color>​ : Start position of the string to return.
 +  * <color #​008800>​length</​color>​ : How many characters must be returned.
 +
 +__OUTPUT__
 +  * <color #​008800>​string</​color>​ : The extracted string.
 +
 +----
 + \\
 +===== HL.BufferedString:​Set() =====
 +  BSObject:​Set(string)
 +
 +Sett the buffered string with the specified '​string'​.
 +
 +__INPUT__
 +  * <color #​008800>​string</​color>​ : String to replace the current contents of the buffered string object.
 +
 +----
  
  
hollywoodlibs/helpers/bufferedstring.txt ยท Ultima modifica: 2019/02/12 09:43 da admin
CC Attribution-Noncommercial 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0