Class MessagePatternUtil

java.lang.Object
org.krysalis.barcode4j.tools.MessagePatternUtil

public class MessagePatternUtil extends Object
Helper class to apply custom message pattern (i.e. message characters grouping) to barcode messages.
Version:
$Id: MessagePatternUtil.java,v 1.3 2008-11-29 16:26:52 jmaerki Exp $
Author:
Dimitar Vlasev
  • Constructor Details

    • MessagePatternUtil

      public MessagePatternUtil()
  • Method Details

    • applyCustomMessagePattern

      public static String applyCustomMessagePattern(String msg, String pattern)
      Defined means to apply custom message pattern (i.e. message characters grouping). If either the message or the pattern are null or empty the "msg" pattern will simply be returned.

      Example: "\_patterned\_:__/__/____" (Any '_' is placeholder for the next message symbol, all other pattern symbols will be inserted between. The '\' is escape char. If the patterned message is too long you can increase the quite zone length to make it visible)

      Parameters:
      msg - the original message
      pattern - the message pattern to be applied
      Returns:
      the formatted message