Skip to content

Commit

Permalink
add element.upper/lower
Browse files Browse the repository at this point in the history
Quick tags to adjust the casing of elements
  • Loading branch information
mcmonkey4eva committed Dec 6, 2013
1 parent 3531c9a commit fd1f3fc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/Element.java
Expand Up @@ -659,6 +659,24 @@ else if (element.toLowerCase().contains(contains.toLowerCase()))
if (attribute.startsWith("trim"))
return new Element(element.trim()).getAttribute(attribute.fulfill(1));

// <--[tag]
// @attribute <e@element.upper>
// @returns Element
// @description
// Returns the value of an element in all uppercase letters.
// -->
if (attribute.startsWith("upper"))
return new Element(element.toUpperCase()).getAttribute(attribute.fulfill(1));

// <--[tag]
// @attribute <e@element.lower>
// @returns Element
// @description
// Returns the value of an element in all lowercase letters.
// -->
if (attribute.startsWith("lower"))
return new Element(element.toLowerCase()).getAttribute(attribute.fulfill(1));

// <--[tag]
// @attribute <el@element.substring[<#>(,<#>)]>
// @returns Element
Expand Down

0 comments on commit fd1f3fc

Please sign in to comment.