Skip to main content
1 of 7
pfg
  • 875
  • 6
  • 15

𝗠𝗮𝘁𝗵 𝖲𝖺𝗇𝗌 𝗔𝗹𝘁𝗲𝗿𝗻𝗮𝘁𝗼𝗿

#Introduction

Try to convert words to two different unicode fonts.

#Challenge

Your task is to transform your input string into the 𝖬𝖺𝗍𝗁 𝖲𝖺𝗇𝗌 and 𝗠𝗮𝘁𝗵 𝗦𝗮𝗻𝘀 𝗕𝗼𝗹𝗱 unicode characters.

All uppercase words should become lowercase 𝗠𝗮𝘁𝗵 𝗦𝗮𝗻𝘀 𝗕𝗼𝗹𝗱 words.

  • For Example: WORD -> 𝘄𝗼𝗿𝗱

All lowercase words should become 𝖬𝖺𝗍𝗁 𝖲𝖺𝗇𝗌 words

  • For example: other words -> 𝗈𝗍𝗁𝖾𝗋 𝗐𝗈𝗋𝖽𝗌

All mixed case words should remain unchanged

  • For example: Mixed Case Words -> Mixed Case Words

Periods and spaces should remain unchanged.

Words are separated by spaces or periods

  • For example (highlighted things are words):

Hello. This is a word. S.O. are these

  • Inputs: A string containing letters, spaces, and periods [A-Za-z\ .]+
  • Output: The formatted string

As this is a golfing challenge, the lowest number of bytes wins

#Example Input and Output

Input:

This is an example STRING that c.o.U.L.d. be INPUTTED. It can CONTAIN multiple sentences.

Output:

This 𝗂𝗌 𝖺𝗇 𝖾𝗑𝖺𝗆𝗉𝗅𝖾 𝗦𝗧𝗥𝗜𝗡𝗚 𝗍𝗁𝖺𝗍 𝖼.𝗈.𝗨.𝗟.𝖽. 𝖻𝖾 𝗜𝗡𝗣𝗨𝗧𝗧𝗘𝗗. It 𝖼𝖺𝗇 𝗖𝗢𝗡𝗧𝗔𝗜𝗡 𝗆𝗎𝗅𝗍𝗂𝗉𝗅𝖾 𝗌𝖾𝗇𝗍𝖾𝗇𝖼𝖾𝗌.

Reference

Math Sans Bold: 𝗮𝗯𝗰𝗱𝗲𝗳𝗴𝗵𝗶𝗷𝗸𝗹𝗺𝗻𝗼𝗽𝗾𝗿𝘀𝘁𝘂𝘃𝘄𝘅𝘆𝘇 (characters 120302 through 120327)

Math Sans: 𝖺𝖻𝖼𝖽𝖾𝖿𝗀𝗁𝗂𝗃𝗄𝗅𝗆𝗇𝗈𝗉𝗊𝗋𝗌𝗍𝗎𝗏𝗐𝗑𝗒𝗓 (characters 120250 through 120275)

pfg
  • 875
  • 6
  • 15