using System;
using System.IO;

namespace Rainbow.Tools
{
    public static class ExtensionMethods
    {
        public static string MakeValidFileNameName(this string name)
        {
            char[] chars = Path.GetInvalidFileNameChars();
            string result = name;
            Array.ForEach(chars, c => result = result.Replace(c, '_'));
            return result;
        }
    }
}
