//-----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------
namespace System.IdentityModel
{
internal static class StringUtil
{
///
/// Returns an interned string equivaluent if found
///
/// Input string.
/// Optimized string.
public static string OptimizeString(string value)
{
if (value != null)
{
string interned = string.IsInterned(value);
if (interned != null)
{
return interned;
}
}
// If the requested string isn't found in the CLR internal pool, don't
// intern it to avoid memory footprint ----up on the pool itself
return value;
}
}
}