CBMC
format_specifier.h File Reference

Format specifiers for String.format. More...

#include <string>
#include <util/invariant.h>
#include <vector>
+ Include dependency graph for format_specifier.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  format_specifiert
 Field names follow the OpenJDK implementation: http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/share/classes/java/util/Formatter.java#l2569. More...
 
class  format_textt
 
class  format_elementt
 

Functions

std::vector< format_elementtparse_format_string (std::string s)
 Parse the given string into format specifiers and text. More...
 

Detailed Description

Format specifiers for String.format.

Definition in file format_specifier.h.

Function Documentation

◆ parse_format_string()

std::vector<format_elementt> parse_format_string ( std::string  s)

Parse the given string into format specifiers and text.

This follows the implementation in openJDK of the java.util.Formatter class: http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/share/classes/java/util/Formatter.java#l2513

Parameters
sa string
Returns
A vector of format_elementt.

Parse the given string into format specifiers and text.

Definition at line 48 of file format_specifier.cpp.