forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnityString.cs
More file actions
25 lines (23 loc) · 932 Bytes
/
UnityString.cs
File metadata and controls
25 lines (23 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using System.Runtime.InteropServices;
using UnityEngine.Scripting;
using UnityEngine.Bindings;
using System.Globalization;
namespace UnityEngine
{
// This function exists because UnityEngine.dll is compiled against .NET 3.5, but .NET Core removes all the overloads
// except this one. So to prevent our code compiling against the (string, object, object) version and use the params
// version instead, we reroute through this.
// TODO: remove this when the dependency goes away.
[VisibleToOtherModules]
internal sealed partial class UnityString
{
public static string Format(string fmt, params object[] args)
{
return String.Format(CultureInfo.InvariantCulture.NumberFormat, fmt, args);
}
}
}