Skip to content

Commit

Permalink
doc: less sed trickery
Browse files Browse the repository at this point in the history
  • Loading branch information
Octachron committed Dec 1, 2020
1 parent d171ea2 commit 41d945b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api_docgen/Makefile.docfiles
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
#* *
#**************************************************************************

define capitalize_one
$(shell echo $(1) | cut -c1 | tr '[:lower:]' '[:upper:]')$\
$(shell echo $(1) | cut -c2-)
endef

define capitalize
$(shell echo $(1) | sed "s/\<./\U&/g")
$(foreach m,$(1),$(call capitalize_one,$m))
endef


Expand Down

0 comments on commit 41d945b

Please sign in to comment.