/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/RoslynAnalyzers/Utilities/Compiler/Extensions/StringExtensions.cs
18 строк
610 B
Cyrus Najmabadi
Delete unused code
21 июн 2025, 04:58
21 июн 2025, 04:58
4fe56aa
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Text; namespace Analyzer.Utilities.Extensions { internal static class StringExtensions { public static bool IsASCII(this string value) { // ASCII encoding replaces non-ascii with question marks, so we use UTF8 to see if multi-byte sequences are there return Encoding.UTF8.GetByteCount(value) == value.Length; } } }