Difference between revisions of "Manuals/calci/REPLACEB"

From ZCubes Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
=REPLACEB(Old_Text, Start_Num, Num_Char, New_Text)=
 
=REPLACEB(Old_Text, Start_Num, Num_Char, New_Text)=
  
*where, <math>Old_Text</math> is the original or old text  
+
*where, <math>Old&#95;Text</math> is the original or old text  
*<math>Start_Num</math> represents the character position in old text
+
*<math>Start&#95;Num</math> represents the character position in old text
*<math>Num_Char</math> represents the number of characters to be replaced in old text
+
*<math>Num&#95;Char</math> represents the number of characters to be replaced in old text
*<math>New_Text</math> is the new text with which specified number of characters in old text are replaced
+
*<math>New&#95;Text</math> is the new text with which specified number of characters in old text are replaced
  
 
REPLACEB() replaces a part of old text string with a new text string, based on the number of bytes specified.
 
REPLACEB() replaces a part of old text string with a new text string, based on the number of bytes specified.
Line 15: Line 15:
 
*This function counts and replaces specified number of byte characters with a new text string.
 
*This function counts and replaces specified number of byte characters with a new text string.
 
*REPLACEB is intended for languages that use double-byte character set (DBCS).
 
*REPLACEB is intended for languages that use double-byte character set (DBCS).
*If <math>Start_Num</math> &lt; 1, Calci displays #N/A message.
+
*If <math>Start&#95;Num</math> &lt; 1, Calci displays #N/A message.
*If <math>Num_Char</math> &lt; 1, Calci displays #N/A message.
+
*If <math>Num&#95;Char</math> &lt; 1, Calci displays #N/A message.
  
 
== Examples ==
 
== Examples ==

Revision as of 18:32, 28 December 2013

REPLACEB(Old_Text, Start_Num, Num_Char, New_Text)

  • where, Failed to parse (syntax error): {\displaystyle Old&#95;Text} is the original or old text
  • Failed to parse (syntax error): {\displaystyle Start&#95;Num} represents the character position in old text
  • Failed to parse (syntax error): {\displaystyle Num&#95;Char} represents the number of characters to be replaced in old text
  • Failed to parse (syntax error): {\displaystyle New&#95;Text} is the new text with which specified number of characters in old text are replaced

REPLACEB() replaces a part of old text string with a new text string, based on the number of bytes specified.

Description

For Example, REPLACEB("JOHN",2,1,"$") returns J$HN

  • This function counts and replaces specified number of byte characters with a new text string.
  • REPLACEB is intended for languages that use double-byte character set (DBCS).
  • If Failed to parse (syntax error): {\displaystyle Start&#95;Num} < 1, Calci displays #N/A message.
  • If Failed to parse (syntax error): {\displaystyle Num&#95;Char} < 1, Calci displays #N/A message.

Examples

ColumnA ColumnB ColumnC
123456
*****
STAR
=REPLACEB(A1,1,2,"*") : Replaces first two characters from old text with "*". Returns *3456 as output.
=REPLACEB(A2,2,1,"@") :Replaces first byte (2 characters) from old text with upper case "@". Returns @**** as output.
=REPLACEB(A3,2,1,"aa") : Replaces 2nd character from old text with "aa". Returns SaaAR as output.

See Also

References