rj-action-library/Runtime/Structures/Map.cs

29 lines
510 B
C#

using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System;
using Godot;
namespace Rokojori
{
public class Map<K,V> : Dictionary<K,V>
{
public void ForEach( Action<K,V> callback )
{
foreach ( var kv in this )
{
callback( kv.Key, kv.Value );
}
}
}
public class StringMap : Map<string,string>
{
public string ReplaceAll( string source )
{
return RegexUtility.ReplaceMultiple( source, this );
}
}
}