inside any component without having to first import them and then prepend this to the function name

What you described is mixin.

  methods: {
    capitalizeFirstLetter: str => str.charAt(0).toUpperCase() + str.slice(1)

This is a global mixin. with this ALL your components will have a capitalizeFirstLetter method, so you can call this.capitalizeFirstLetter(...) from component methods or you can call it directly as capitalizeFirstLetter(...) in component template.

Working example:

See the documentation here: