Skip to content

Instantly share code, notes, and snippets.

@binki
Created January 25, 2017 20:06
Show Gist options
  • Save binki/eadb3986c19dfea1e6369f698b60b212 to your computer and use it in GitHub Desktop.
Save binki/eadb3986c19dfea1e6369f698b60b212 to your computer and use it in GitHub Desktop.
Haxe Interpolated String Example
using System;
using System.Linq;
class Program
{
static void Main(string[] args)
{
intr($"asdf{""}{"bsdf"}"); // Format=asdf{0}{1}, Arguments=“”,“bsdf”
intr($"asdf{""}bsdf"); // Format=asdf{0}bsdf, Arguments=“”
}
static void intr(FormattableString s)
{
Console.WriteLine($"Format={s.Format}, Arguments={string.Join(",", s.GetArguments().Select(a => $"“{a}”"))}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment