Skip to content

Github Action: Make a string lowercase, uppercase, or capitalized

License

Notifications You must be signed in to change notification settings

tetouanii/change-string-case-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Change String Case GitHub Action

This action accepts any string, and outputs three different versions of that string:

  • lowercase (XyZzY -> xyzzy)
  • uppercase (XyZzY -> XYZZY)
  • capitalized (Xyzzy -> Xyzzy)

You can access the outputted strings through the job outputs context. See docs here, or the Example Usage section below.

Inputs

string

Required The string you want manipulated

Outputs

lowercase

inputStr.toLowerCase()

Example: XyZzY -> xyzzy

uppercase

inputStr.toUpperCase()

Example: XyZzY -> XYZZY

capitalized

inputStr.charAt(0).toUpperCase() + inputStr.slice(1).toLowerCase()

Example: XyZzY -> Xyzzy

Example Usage

name: SomeWorkflow
on: [push]
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - id: string
        uses: ASzc/change-string-case-action@v5
        with:
          string: XyZzY
      - id: step2
        run: echo ${{ steps.string.outputs.lowercase }}

About

Github Action: Make a string lowercase, uppercase, or capitalized

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%