Jump to content
This wiki has been automatically closed because there have been no edits or log actions made within the last 60 days. If you are a user (who is not the bureaucrat) that wishes for this wiki to be reopened, please request that at Requests for reopening wikis. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki, you can go to Special:ManageWiki and uncheck the "Closed" box to reopen it.

Dplnum: Difference between revisions

Reformat a bit
imported>FrozenPlum
(Prior issue requiring {{purgenote}} seems to have resolved, remove it)
imported>FrozenPlum
(Reformat a bit)
Line 1:
{{DPL manual|section=dplnum}}
 
==Syntax==
<pre><nowiki>
{{#dplnum:text}}
</nowiki></pre>
 
Tries to guess a number that is buried in the text, using a set of heuristic rules which may work or not. The idea is to extract the number, so that it can be used as a sorting value in the column of a DPL table output.
==Effect==
Tries to guess a number that is buried in the text.
Uses a set of heuristic rules which may work or not.
 
==Syntax==
The idea is to extract the number so that it can be used as a sorting value in the column of a DPL table output.
<code><nowiki>{{#dplnum:''text''}}</nowiki></code> where {{tt|text}} is a number within some text.
 
==ExampleExamples==
* <code><nowiki> {{#dplnum:this is 4711 a text with a number}} </nowiki></code> '''returns: ''' {{#dplnum:this is 4711 a text with a number}}
* <code><nowiki> {{#dplnum:well above 47 Mio. US$}} </nowiki></code> '''returns: ''' {{#dplnum:well above 47 Mio US$}}
* <code><nowiki> {{#dplnum:13 Mrd}} </nowiki></nowiki></code> '''returns: ''' {{#dplnum:13 Mrd}}
* <code><nowiki> {{#dplnum:it is 47,123 Mio}} </nowiki></code> '''returns: ''' {{#dplnum:it is 47,123 Mio}}
* <code><nowiki> {{#dplnum:it is 47.123,56}} </nowiki></code> '''returns: ''' {{#dplnum:it is 47.123}}
* <code><nowiki> {{#dplnum:it is 47,000}} </nowiki></code> '''returns: ''' {{#dplnum:it is 47,000}}
* <code><nowiki> {{#dplnum:it is 4.13}} </nowiki></code> '''returns: ''' {{#dplnum:it is 4.13}}
* <code><nowiki> {{#dplnum:it is 4,13}} </nowiki></code> '''returns: ''' {{#dplnum:it is 4,13}}
* <code><nowiki> {{#dplnum:it is 0,13}} </nowiki></code> '''returns: ''' {{#dplnum:it is 0,13}}
 
[[Category:Other Modules]]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.