• Intro Headers Instructions Macros Commands
Fork me on GitHub
    • Getting Started
      • Introduction
      • How to install bnd
      • Guided Tour Workspace & Projects
      • bnd / bndlib Features and JAR Wrapping Techniques
      • FAQ - Frequently Asked Questions
    • Concepts and Practices
      • Concepts
      • Background
      • Best practices
    • Build and Development
      • Build
      • Generating JARs
      • Versioning
      • Baselining
      • Service Components
      • Metatype
      • Contracts
      • Bundle Annotations
      • Accessor Properties
      • SPI Annotations
    • Dependency and Launching
      • Resolving Dependencies
      • Launching
      • Startlevels
    • Testing
      • Testing
      • Testing with Launchpad
    • Packaging and Distribution
      • Packaging Applications
      • JPMS Libraries
      • Wrapping Libraries to OSGi Bundles
    • Documentation and Tools
      • Generating Documentation
      • bnd CLI Commands
      • For Developers
      • Templates for Workspaces
      • Tips for Windows users
      • Tools bound to bnd
    • Reference Material
      • Reference
      • Headers
      • Instruction Reference
      • Instruction Index
      • Macro Reference
      • Macro Index
      • Plugins
      • External Plugins
    • Configuration and Troubleshooting
      • Settings
      • Errors
      • Warnings
  • toupper STRING

    Prev Next
    Macro
    Convert a string to uppercase

    Summary

    The toupper macro converts a string to uppercase using the default locale.

    Syntax

    ${toupper;<string>}
    

    Parameters

    • string - The string to convert to uppercase

    Behavior

    • Converts all lowercase letters to uppercase
    • Uses default locale for conversion
    • Non-letter characters remain unchanged
    • Returns the uppercase string

    Examples

    Convert simple string:

    ${toupper;hello world}
    # Returns: "HELLO WORLD"
    

    Convert mixed case:

    ${toupper;MyClassName}
    # Returns: "MYCLASSNAME"
    

    Create constants:

    constant.name=${toupper;${property.name}}
    

    Format identifiers:

    Bundle-Id: ${toupper;${bsn}}
    

    Use Cases

    • Creating uppercase constants
    • Normalizing strings for comparison
    • Formatting identifiers
    • Case-insensitive matching
    • Standard formatting requirements

    Notes

    • Uses default locale conversion rules
    • See also: ${tolower} for lowercase conversion
    • Locale-sensitive for certain characters

    See test cases in MacroTestsForDocsExamples.java

Prev Next
Search
    • Home