'Create a Text File in Julia

I have a string

a = """
---
title: Just a test
author: Me
date: 2022-01-03
---

# Test Header 
Some text.
"""

from which I want to create a file foobar.jmd. What is the best way of doing this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source