using System;
using System.Linq;

namespace MyCompiler {
    class Program {
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello world!".Substring(0,3));
            mth("foo");
            mth("foobar0009");
            mth("foo099");
            mth("foo9");
        }
        
        public static void mth(string str)
        {
            string numlen = str.Count(x => char.IsDigit(x)) > 0
                            ? string.Join("",str.Where(x => char.IsDigit(x)).ToArray()) : "0";
            string word = string.Join("",str.Where(x => char.IsLetter(x)).ToArray()) + 
                              (Convert.ToInt32(numlen) + 1).ToString(new string('0',numlen.Length));
                              
            Console.WriteLine(word);
        }
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: