{{newin|[[0.7.0]]|070|type=function}}
Gets formatting information for text, given a wrap limit.

This function accounts for newlines correctly (i.e. '\n').

== Function ==
{{newin|[[0.10.0]]|100|type=variant}}
=== Synopsis ===
<source lang="lua">
width, wrappedtext = Font:getWrap( text, wraplimit )
</source>
=== Arguments ===
{{param|string|text|The text that will be wrapped.}}
{{param|number|wraplimit|The maximum width in pixels of each line that ''text'' is allowed before wrapping.}}
=== Returns ===
{{param|number|width|The maximum width of the wrapped text.}}
{{param|table|wrappedtext|A [[sequence]] containing each line of text that was wrapped.}}

== Function ==
{{oldin|[[0.10.0]]|100|type=variant}}
=== Synopsis ===
<source lang="lua">
width, lines = Font:getWrap( text, wraplimit )
</source>
=== Arguments ===
{{param|string|text|The text that would be wrapped.}}
{{param|number|wraplimit|The maximum width in pixels of each line that ''text'' is allowed before wrapping.}}
=== Returns ===
{{param|number|width|The maximum width of the wrapped text.}}
{{param|number|lines|The number of lines that the wrapped text will have.}}

== See Also ==
* [[parent::Font]]
* [[love.graphics.printf]]
* [[Text:setf]]
[[Category:Functions]]
{{#set:Description=Gets formatting information for text, given a wrap limit.}}
== Other Languages ==
{{i18n|Font:getWrap}}