/*
Displays the given string as title.
184410
public function title(string $title): Command
    {
        $size = strlen($title);
        $spaces = str_repeat(' ', $size);

        $this->output->newLine();
        $this->output->writeln("<bg=blue;fg=white>$spaces$spaces$spaces</>");
        $this->output->writeln("<bg=blue;fg=white>$spaces$title$spaces</>");
        $this->output->writeln("<bg=blue;fg=white>$spaces$spaces$spaces</>");
        $this->output->newLine();

        return $this;
    }
1274849
def text_to_title(value):
    """"""
    title = None
    if not value:
        return title
    words = value.split(" ")
    keep_words = []
    for word in words:
        if word.endswith(".") or word.endswith(":"):
            keep_words.append(word)
            if len(word) > 1 and "<italic>" not in word and "<i>" not in word:
                break
        else:
            keep_words.append(word)
    if len(keep_words) > 0:
        title = " ".join(keep_words)
        if title.split(" ")[-1] != "spp.":
            title = title.rstrip(" .:")
    return title
79287
def title(value, failure_string='N/A'):
    
    try:
        value = value.lower()
        t = re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.title())
        result = re.sub("\d([A-Z])", lambda m: m.group(0).lower(), t)
        if not result:
            return failure_string
        return result
    except:
        return failure_string
348314
def title(self) -> str:
        """"""
        title_element = _find_tag(self.head, 'title')
        if title_element:
            return title_element.textContent
        return ''
1102677
public void setTitle(String newTitle)
	{
		if (newTitle.length() > TITLE_SIZE)
		{
			title = newTitle.substring(0, TITLE_SIZE);
		}
		else
		{
			title = newTitle;
		}
	}
415570
public static void title(Writer writer, String title) throws IOException {
        if (title == null || title.isEmpty()) {
            return;
        }
        String out = String.format("%s\n%s\n\n", title,
                Stream.generate(() -> "=").limit(title.length()).collect(Collectors.joining()));
        writer.write(out);
    }
1370380
public void setTitle(java.util.Collection<StringFilter> title) {
        if (title == null) {
            this.title = null;
            return;
        }

        this.title = new java.util.ArrayList<StringFilter>(title);
    }
849505
public static function upperCaseTitle($string){

		// Only transform to lowercase if title is more than a single word

		if(strpos($string, ' ') !== false){

			if(strtoupper($string) == $string) $string = strtolower($string);
		}

		$string = ucwords($string);

		$string = str_replace(self::_getAdpositions(),
			self::_getAdpositions(true), $string);

		return ucfirst($string);
	}
519894
public static String titleize(final String text, final String[] intCaps)
    {
        String str = text.toLowerCase(Locale.ENGLISH).replaceAll("[\\s_]+", SPACE).trim();
        return titleize(str, SPACE, intCaps);
    }
539421
def get_title(soup):
  """"""
  if soup.title:
    return soup.title.string
  if soup.h1:
    return soup.h1.string
  return ''
1179603
public static function titleCase($string) {
        return static::cache(array(__METHOD__, $string), function() use ($string) {
            return mb_convert_case(str_replace('_', ' ', $string), MB_CASE_TITLE);
        });
    }
194098
public void setTitle(String title)
    {
        AbstractHtmlState tsh = getState();
        tsh.registerAttribute(AbstractHtmlState.ATTR_GENERAL, TITLE, title);
    }
339436
function title( $attribute, $name = null )
    {
        $keyword = new eZKeyword();
        $keyword->fetch( $attribute );
        $return = $keyword->keywordString();

        return $return;
    }
1272911
def condition_title_for(key)
      title_parts = key.to_s.split('.')
      title = key.to_s.gsub(".", ": ").gsub("_", " ")
      title = title.split(" ").collect{|part| part.split("/").last.capitalize}.join(" ")
      if title_parts.size > 1
        "#{JOIN_NAME_INDICATOR} #{title}"
      else
        title
      end
    end
1086729
def _format_title_string(self, title_string):
        
        sp = title_string.split(self.icy_tokkens[0])
        if sp[0] == title_string:
            ret_string = title_string
        else:
            ret_string = self.icy_title_prefix + sp[1]
        return self._title_string_format_text_tag(ret_string)
1370101
public String getWindowTitle(String title) {
        if (configuration.windowtitle.length() > 0) {
            title += " (" + configuration.windowtitle  + ")";
        }
        return title;
    }
375037
function title(title, widths, opt){
  var wid = title.length;
  var total = widths.reduce((a, b) => a + b + 3, 0) - 1;
  var left = parseInt((total - wid) / 2);
  if (!opt.plain) title = '\u001b[1m' + title + '\u001b[22m';
  log(p[0][0] + widths.map(col => p.h + strN(col, p.h) + p.h).join(p.h) + p[0][2]);
  log(p.v + widths.map(col => ' ' + strN(col, ' ') + ' ').join(' ') + p.v);
  log(p.v + strN(left) + title + strN(total - left - wid) + p.v);
  log(p.v + widths.map(col => ' ' + strN(col, ' ') + ' ').join(' ') + p.v);
}