Formats the help string.
553243
def format_help(help):
    """"""
    help = help.replace("Options:", str(crayons.normal("Options:", bold=True)))
    help = help.replace(
        "Usage: pipenv", str("Usage: {0}".format(crayons.normal("pipenv", bold=True)))
    )
    help = help.replace("  check", str(crayons.red("  check", bold=True)))
    help = help.replace("  clean", str(crayons.red("  clean", bold=True)))
    help = help.replace("  graph", str(crayons.red("  graph", bold=True)))
    help = help.replace("  install", str(crayons.magenta("  install", bold=True)))
    help = help.replace("  lock", str(crayons.green("  lock", bold=True)))
    help = help.replace("  open", str(crayons.red("  open", bold=True)))
    help = help.replace("  run", str(crayons.yellow("  run", bold=True)))
    help = help.replace("  shell", str(crayons.yellow("  shell", bold=True)))
    help = help.replace("  sync", str(crayons.green("  sync", bold=True)))
    help = help.replace("  uninstall", str(crayons.magenta("  uninstall", bold=True)))
    help = help.replace("  update", str(crayons.green("  update", bold=True)))
    additional_help = """
Usage Examples:
   Create a new project using Python 3.7, specifically:
   $ {1}

   Remove project virtualenv (inferred from current directory):
   $ {9}

   Install all dependencies for a project (including dev):
   $ {2}

   Create a lockfile containing pre-releases:
   $ {6}

   Show a graph of your installed dependencies:
   $ {4}

   Check your installed dependencies for security vulnerabilities:
   $ {7}

   Install a local setup.py into your virtual environment/Pipfile:
   $ {5}

   Use a lower-level pip command:
   $ {8}

Commands:""".format(
        crayons.red("pipenv --three"),
        crayons.red("pipenv --python 3.7"),
        crayons.red("pipenv install --dev"),
        crayons.red("pipenv lock"),
        crayons.red("pipenv graph"),
        crayons.red("pipenv install -e ."),
        crayons.red("pipenv lock --pre"),
        crayons.red("pipenv check"),
        crayons.red("pipenv run pip freeze"),
        crayons.red("pipenv --rm"),
    )
    help = help.replace("Commands:", additional_help)
    return help
120571
def help(self, message):
        """"""
        all_regexes = self.load("all_listener_regexes")
        help_text = "Here's everything I know how to listen to:"
        for r in all_regexes:
            help_text += "\n%s" % r

        self.say(help_text, message=message)
855886
private void setMinFormatString()
    {
        int i = _tzFormatString.indexOf("ss.SSS");
        int l = 6;
        if (i>=0)
            _millis=true;
        else
        {
            i = _tzFormatString.indexOf("ss");
            l=2;
        }
        
        // Build a formatter that formats a second format string
        // Have to replace @ with ' later due to bug in SimpleDateFormat
        String ss1=_tzFormatString.substring(0,i);
        String ss2=_tzFormatString.substring(i+l);
        _minFormatString =ss1+(_millis?"'ss.SSS'":"'ss'")+ss2;
    }
557026
public function help($help)
    {
        $green = "\033[49;32m";
        $end = "\033[0m";

        $array['import'] = [
            'Import Search Results',
            $green . 'mp3 import' . $end,
            '',
            'Option          Description             Required    Default    Available Options',
            '--confirm=      Display Confirmation    No          Yes        Yes, No'
        ];

        $implode = implode(
            "\n",
            $array[$help]
        );

        return $implode . "\n";
    }
185718
public function diag_strings() {
        $sm = get_string_manager();
        if (!$sm->string_exists($this->identifier, $this->component)) {
            debugging("Help title string does not exist: [$this->identifier, $this->component]");
        }
        if (!$sm->string_exists($this->identifier.'_help', $this->component)) {
            debugging("Help contents string does not exist: [{$this->identifier}_help, $this->component]");
        }
    }
71148
def format_output(self, rendered_widgets):
        
        ret = [u'<ul class="formfield">']
        for i, field in enumerate(self.fields):
            label = self.format_label(field, i)
            help_text = self.format_help_text(field, i)
            ret.append(u'<li>%s %s %s</li>' % (
                label, rendered_widgets[i], field.help_text and help_text))

        ret.append(u'</ul>')
        return ''.join(ret)
745899
def as_strings(self):
        """"""
        if self.value == '' or self.value is None:
            return '{0};\n'.format(self.name)
        if '"' not in self.value and (';' in self.value or '#' in self.value):
            return '{0} "{1}";\n'.format(self.name, self.value)
        return '{0} {1};\n'.format(self.name, self.value)
35416
def format(self, formatstring, *args):
        """"""

        # Make a new section
        if self.incoming_section:
            self.SendMessage(['s', {'name': args}])
            self.incoming_section = False
1034165
protected function help_formatter( $help = null ) 
	{
		if ( is_null( $help ) ) 
		{
			CCCli::line( 'Invalid data passed to help formatter.' , 'red' ); return;
		}
	
		$output = array();
		
		// print the name
		if ( isset( $help['name'] ) ) 
		{	
			$output[] = '+-'.str_repeat( '-', strlen( $help['name'] ) ).'-+';
			$output[] = '| '.CCCli::color( $help['name'], 'light_yellow' ).' |';
			$output[] = '+-'.str_repeat( '-', strlen( $help['name'] ) ).'-+';	
		}
		
		// description
		if ( isset( $help['desc'] ) ) 
		{
			$output[] = wordwrap( str_replace( "\n", "\n".' * ', $help['desc'] ), 60 );	
		}
		
		// list the actions 
		if ( isset( $help['actions'] ) && !empty( $help['actions'] ) ) 
		{	
			// for every action in this console controller
			foreach( $help['actions'] as $action => $attributes )
			{
				// print the action
				$output[] = '';
				$output[] = '| '.CCStr::suffix( get_called_class(), '\\' ).'::'.CCCli::color( $action, 'cyan' );
				$output[] = '|';
				
				// for every attribute ( arguments, usage etc. )
				foreach( $attributes as $attribute => $options )
				{
					$output[] = '| '.CCCli::color( ucfirst( $attribute ), 'light_yellow' );
					
					// if we just got a string
					if ( is_string( $options ) )
					{
						$output[] = '|  '.CCCli::color( $options, 'green' );
					}
					// a key value array
					elseif ( is_array( $options ) )
					{
						// print every option and its description
						foreach( $options as $option => $description )
						{
							$buffer = CCCli::color( $option, 'green' );
							$buffer .= str_repeat( ' ', 35 - strlen( $buffer ) );
							$buffer .= $description;
							$buffer = '|  '.$buffer;
							
							// is the line to long?
							if ( strlen( $buffer ) > 80 )
							{
								$overflow = substr( $buffer, 80 );
								
								$buffer = substr( $buffer, 0, 80 )."\n";
								
								$overflow = wordwrap( $overflow, 45 );
								$overflow = explode( "\n", $overflow );
								
								foreach( $overflow as $key => $value )
								{
									$overflow[$key] = '| '.str_repeat( ' ',  25 ).trim( $value );	
								}
								
								$buffer .= implode( "\n", $overflow );
							}
							
							$output[] = $buffer;
						}
					}
					
					$output[] = '|';
				}
				
				array_pop( $output );
			}
		}
		
		return $output;
	}
1029163
def format_help(self, ctx, formatter):
        
        self.format_usage(ctx, formatter)
        self.format_help_text(ctx, formatter)
        self.format_options(ctx, formatter)
        self.format_epilog(ctx, formatter)
210811
def help(self, args=None, userlevel=9):
        """"""
        out = [main.__file__+"\n"]

        if args is not None:
            parsed = self.parse(args, ignore_help=True)
        else:
            parsed = self._default_dict()

        for thing in self.options:
            if type(thing) == str:
                out.append("     "+thing)
            elif thing[0] <= userlevel:
                out.append("     %10s   %s ( %s )" % (thing[1], thing[-1], str(parsed[thing[2]])))

        return "\n".join(out)+"\n"
247876
def format(self, password: str = '') -> str:
        """"""
        return MARKER_START + \
            self.name + \
            self.action + \
            self.args + \
            password + \
            MARKER_END
274117
def get_help(self, ctx):
        
        formatter = ctx.make_formatter()
        self.format_help(ctx, formatter)
        return formatter.getvalue().rstrip('\n')
343658
function stringFormat(source) {
        var args = arguments;
        return source.replace(
            /\{([0-9]+)\}/g,
            function (match, index) {
                return args[index - 0 + 1];
            });
    }
1140413
def string_format
      (command_environment.map do |key, value|
        [key, value].join("=")
      end + [command]).join(" ")
    end
457700
def format_help(self):
        
        help_msg = super(FocusArgParser, self).format_help()
        return re.sub(r'\{.+\}', '', help_msg)
202999
def format_str(self):
        '''  '''
        if self.static:
            return self.route.replace('%','%%')
        out, i = '', 0
        for token, value in self.tokens():
            if token == 'TXT': out += value.replace('%','%%')
            elif token == 'ANON': out += '%%(anon%d)s' % i; i+=1
            elif token == 'VAR': out += '%%(%s)s' % value[1]
        return out