Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Core
      • Char
      • FileLog
      • ILogReceiver
      • IScyllaDependencyProvider
      • Log
      • LogCategory
      • LogEntry
      • LogFileFormat
      • LogLevel
      • Num
      • ScyllaAAMode
      • ScyllaAAQuality
      • ScyllaBootstrap
      • ScyllaCore
      • ScyllaCore.Meta
      • ScyllaDependencyInfoData
      • ScyllaMaterialSurface
      • ScyllaRenderPipeline
      • ScyllaShadowResolution
      • Str
      • TextAlignment
      • UnityConsoleLog
    • Scylla.Core.Attributes
      • AttributeValidator
      • CompareOperator
      • ConditionalAttributeBase
      • DisableIfAttribute
      • DisplayNameAttribute
      • EnableIfAttribute
      • FoldoutAttribute
      • FormerlySerializedAsAttribute
      • GroupAttribute
      • HideIfAttribute
      • HideInFilterWindowAttribute
      • HorizontalLineAttribute
      • InfoBoxAttribute
      • InfoType
      • LayerFieldAttribute
      • MinMaxRangeAttribute
      • MonoTextAreaAttribute
      • NotEmptyAttribute
      • NotNullAttribute
      • ReadOnlyAttribute
      • ReflectedTypeAttribute
      • RequiredAttribute
      • SceneFieldAttribute
      • ShowIfAttribute
      • SortingLayerFieldAttribute
      • TagFieldAttribute
      • TitleAttribute
      • ValidateInputAttribute
      • ValidationException
    • Scylla.Core.Config
      • ConfigFileManager
      • ConfigurationRegistry
      • ConfigurationSlotAttribute
      • ConfigurationValidationResult
      • ConsoleLoggingSettings
      • FileLogFormattingSettings
      • FileLoggingSettings
      • IConfigurationRegistry
      • ScyllaConfiguration
      • ScyllaCoreConfiguration
      • ScyllaEventConfiguration
      • ScyllaLoggerConfiguration
      • ValidationSeverity
    • Scylla.Core.Editor
      • CalendarDefinitionEditor
      • ClockDefinitionEditor
      • ColorGradientAssetEditor
      • ColorGradientReducer
      • ColorPaletteAssetEditor
      • DebugCameraEditor
      • DebugEventMonitor
      • DependencySourceType
      • DependencyStatus
      • EventFilterCategory
      • EventLogEntry
      • GameViewCapture
      • IScyllaShaderProvider
      • ScyllaAboutWindow
      • ScyllaBootstrapEditor
      • ScyllaCard
      • ScyllaConfigurationEditorBase
      • ScyllaCopyMenu
      • ScyllaCoreConfigurationEditor
      • ScyllaCoreDependencyProvider
      • ScyllaCoreShaderProvider
      • ScyllaDebugWindow
      • ScyllaDependencyDetector
      • ScyllaDependencyGraphElement
      • ScyllaDependencyInfo
      • ScyllaDescriptionBox
      • ScyllaEditorAssetUtil
      • ScyllaEditorAssets
      • ScyllaEditorBase
      • ScyllaEditorClipboard
      • ScyllaEditorColors
      • ScyllaEditorConstants
      • ScyllaEditorIconNames
      • ScyllaEditorLogScope
      • ScyllaEditorPrefs
      • ScyllaEditorStyles
      • ScyllaEditorTheme
      • ScyllaEditorUSSClasses
      • ScyllaEventConfigurationEditor
      • ScyllaFontCharacterExtractorWindow
      • ScyllaGettingStartedWindow
      • ScyllaIconPreview
      • ScyllaLoggerConfigurationEditor
      • ScyllaLogoElement
      • ScyllaMenuItems
      • ScyllaModuleEditor
      • ScyllaModuleStatusIndicator
      • ScyllaModuleWindow
      • ScyllaNameField
      • ScyllaPanel
      • ScyllaPresetSelector
      • ScyllaSceneConfigurationEditor
      • ScyllaScheduler
      • ScyllaSearchField
      • ScyllaSearchablePopup
      • ScyllaSearchablePopup.Item
      • ScyllaSettingsProvider
      • ScyllaSetupWizard
      • ScyllaShaderInclusionBuildProcessor
      • ScyllaSplitView
      • ScyllaStatusBar
      • ScyllaTabBar
      • ScyllaTimeConfigurationEditor
      • ScyllaToolWindowBase
      • ScyllaToolbar
      • ScyllaValidatedTextField
      • ScyllaWizardWindowBase
      • ScyllaWizardWindowBase.WizardLayout
      • ScyllaWizardWindowBase.WizardStepDef
    • Scylla.Core.Editor.Attributes
      • AttributeReflectionCache
      • ConditionalDrawerBase
      • DisableIfDrawer
      • EnableIfDrawer
      • FoldoutDrawer
      • HideIfDrawer
      • HorizontalLineDrawer
      • InfoBoxDrawer
      • LayerFieldDrawer
      • MinMaxRangeDrawer
      • MonoTextAreaDrawer
      • ReadOnlyDrawer
      • RequiredDrawer
      • SceneFieldDrawer
      • SerializedPropertyExtensions
      • ShowIfDrawer
      • SortingLayerFieldDrawer
      • TagFieldDrawer
      • TitleDrawer
    • Scylla.Core.Editor.Drawers
      • DoubleRangeDrawer
      • FloatRangeDrawer
      • IntRangeDrawer
    • Scylla.Core.Editor.Util.UI.Layout
      • ScyllaUIEdgeInsetsDrawer
      • ScyllaUILayoutMenuItems
      • ScyllaUILengthDrawer
    • Scylla.Core.Events
      • IScyllaEventBus
      • ScyllaEvent
      • ScyllaEventBus
      • ScyllaEventPriority
      • ScyllaEventSubscription
      • ScyllaEvents
      • ScyllaFrameworkInitializedEvent
      • ScyllaFrameworkShutdownEvent
      • ScyllaModuleShutdownEvent
      • ScyllaModuleStartedEvent
    • Scylla.Core.Modules
      • IScyllaModule
      • IScyllaModuleManager
      • ScyllaModule
      • ScyllaModuleDependency
      • ScyllaModuleDependencyType
      • ScyllaModuleException
      • ScyllaModuleID
      • ScyllaModuleInfo
      • ScyllaModuleManager
      • ScyllaModulePlacement
      • ScyllaModuleState
    • Scylla.Core.Scenes
      • HygieneOverride
      • SceneLoadOperation
      • SceneLoadRunner
      • SceneLoadState
      • ScyllaActiveSceneChangedEvent
      • ScyllaSceneConfiguration
      • ScyllaSceneLoadOptions
      • ScyllaSceneLoadProgressEvent
      • ScyllaSceneLoadedEvent
      • ScyllaSceneManager
      • ScyllaSceneUnloadedEvent
      • ScyllaSceneWillLoadEvent
      • ScyllaSceneWillUnloadEvent
    • Scylla.Core.Settings
      • ScyllaProjectSettings
    • Scylla.Core.Structures
      • FractionalHexCoord
      • GridUtil
      • HexCoord
      • HexCornerCoord
      • HexCornerMap<TData>
      • HexCornerMap<TData>.Enumerator
      • HexCornerPosition
      • HexEdgeCoord
      • HexEdgeDirection
      • HexEdgeMap<TData>
      • HexEdgeMap<TData>.Enumerator
      • HexGridLayout
      • HexLayoutMode
      • HexOrientation
      • IScyllaCollection
      • IScyllaCollection<T>
      • IScyllaGraph
      • IScyllaGrid<TCoord, TCell>
      • IScyllaMap<TKey, TValue>
      • IScyllaMutableGraph
      • IScyllaMutableGraph<TNodeData>
      • IScyllaMutableGraph<TNodeData, TEdgeData>
      • IScyllaPausableState<TContext>
      • IScyllaPriorityQueueItem
      • IScyllaReadOnlyGraph
      • IScyllaReadOnlyGraph<TNodeData>
      • IScyllaReadOnlyGraph<TNodeData, TEdgeData>
      • IScyllaState<TContext>
      • IScyllaTransition<TContext>
      • IScyllaTrie
      • IScyllaTrie<TValue>
      • NeighborWriter<TCoord>
      • ScyllaAABB2
      • ScyllaAABB3
      • ScyllaAdjacencyListGraph
      • ScyllaAdjacencyListGraph.Builder
      • ScyllaAdjacencyListGraph.NodeEnumerator
      • ScyllaAdjacencyListGraph.SynchronizedScyllaAdjacencyListGraph
      • ScyllaAdjacencyListGraph<TNodeData>
      • ScyllaAdjacencyListGraph<TNodeData, TEdgeData>
      • ScyllaBVH
      • ScyllaBVH.Builder
      • ScyllaBVHCore
      • ScyllaBitArray
      • ScyllaBitArray.Builder
      • ScyllaBitArray.Enumerator
      • ScyllaBitArray.SynchronizedScyllaBitArray
      • ScyllaBitArrayDOTS
      • ScyllaBitArrayDOTS.Builder
      • ScyllaBitArrayDOTS.Enumerator
      • ScyllaCSRGraph
      • ScyllaCSRGraph.Builder
      • ScyllaCSRGraph<TNodeData>
      • ScyllaCSRGraph<TNodeData, TEdgeData>
      • ScyllaCollectionCapabilities
      • ScyllaCollectionThreadSafety
      • ScyllaCompositeState<TContext>
      • ScyllaDequeDOTS<T>
      • ScyllaDequeDOTS<T>.Builder
      • ScyllaDeque<T>
      • ScyllaDeque<T>.Builder
      • ScyllaDeque<T>.Enumerator
      • ScyllaDeque<T>.SynchronizedScyllaDeque
      • ScyllaDisjointSet
      • ScyllaDisjointSet.Builder
      • ScyllaDisjointSet.SynchronizedScyllaDisjointSet
      • ScyllaDisjointSetDOTS
      • ScyllaDisjointSetDOTS.Builder
      • ScyllaGenericObjectPool<T>
      • ScyllaGenericObjectPool<T>.Builder
      • ScyllaGenericObjectPool<T>.Enumerator
      • ScyllaGenericObjectPool<T>.SynchronizedScyllaGenericObjectPool
      • ScyllaGraphAlgorithms
      • ScyllaGraphDOTS
      • ScyllaGraphDOTS.Builder
      • ScyllaGraphEdge
      • ScyllaGraphEdge<TEdgeData>
      • ScyllaGraphNode
      • ScyllaGraphNodeFlags
      • ScyllaGraphPath
      • ScyllaGraphProperties
      • ScyllaGraphSearchState
      • ScyllaGridGraphAdapter<TCoord, TCell>
      • ScyllaHexGrid<TCell>
      • ScyllaHexGrid<TCell>.Builder
      • ScyllaHexGrid<TCell>.Enumerator
      • ScyllaHexGrid<TCell>.SynchronizedScyllaHexGrid
      • ScyllaHierarchicalStateMachine<TContext>
      • ScyllaKDTree3
      • ScyllaKDTree3.Builder
      • ScyllaKDTree3Core
      • ScyllaKDTree3Core.Node
      • ScyllaLayeredStateMachine<TContext>
      • ScyllaLooseOctree
      • ScyllaLooseOctree.Builder
      • ScyllaLooseOctreeCore
      • ScyllaLooseOctreeUtil
      • ScyllaLooseOctree<T>
      • ScyllaLooseQuadtree
      • ScyllaLooseQuadtree.Builder
      • ScyllaLooseQuadtreeCore
      • ScyllaLooseQuadtreeUtil
      • ScyllaLooseQuadtree<T>
      • ScyllaMapDOTS<TKey, TValue>
      • ScyllaMapDOTS<TKey, TValue>.Builder
      • ScyllaMapEntry<TKey, TValue>
      • ScyllaMap<TKey, TValue>
      • ScyllaMap<TKey, TValue>.Builder
      • ScyllaMap<TKey, TValue>.Enumerator
      • ScyllaMap<TKey, TValue>.SynchronizedScyllaMap
      • ScyllaObjectPool<T>
      • ScyllaObjectPool<T>.Builder
      • ScyllaObjectPool<T>.Enumerator
      • ScyllaObjectPool<T>.SynchronizedScyllaObjectPool
      • ScyllaPausableStateBase<TContext>
      • ScyllaPriorityQueueDOTS<TValue>
      • ScyllaPriorityQueueDOTS<TValue>.Builder
      • ScyllaPriorityQueueItemComparer<T>
      • ScyllaPriorityQueueNode<TValue>
      • ScyllaPriorityQueueOrder
      • ScyllaPriorityQueue<T>
      • ScyllaPriorityQueue<T>.Builder
      • ScyllaPriorityQueue<T>.Enumerator
      • ScyllaPriorityQueue<T>.SynchronizedScyllaPriorityQueue
      • ScyllaPushdownStateMachine<TContext>
      • ScyllaQuadtreePlane
      • ScyllaQueueDOTS<T>
      • ScyllaQueueDOTS<T>.Builder
      • ScyllaQueue<T>
      • ScyllaQueue<T>.Builder
      • ScyllaQueue<T>.Enumerator
      • ScyllaQueue<T>.SynchronizedScyllaQueue
      • ScyllaRay3
      • ScyllaRingBufferDOTS<T>
      • ScyllaRingBufferDOTS<T>.Builder
      • ScyllaRingBufferDOTS<T>.Enumerator
      • ScyllaRingBufferDOTS<T>.ReverseEnumerable
      • ScyllaRingBufferDOTS<T>.ReverseEnumerator
      • ScyllaRingBuffer<T>
      • ScyllaRingBuffer<T>.Builder
      • ScyllaRingBuffer<T>.Enumerator
      • ScyllaRingBuffer<T>.ReverseEnumerable
      • ScyllaRingBuffer<T>.ReverseEnumerator
      • ScyllaRingBuffer<T>.SynchronizedScyllaRingBuffer
      • ScyllaSparseHexGrid<TCell>
      • ScyllaSparseHexGrid<TCell>.Builder
      • ScyllaSparseHexGrid<TCell>.Enumerator
      • ScyllaSparseHexGrid<TCell>.SynchronizedScyllaSparseHexGrid
      • ScyllaSparseSquareGrid<TCell>
      • ScyllaSparseSquareGrid<TCell>.Builder
      • ScyllaSparseSquareGrid<TCell>.Enumerator
      • ScyllaSparseSquareGrid<TCell>.SynchronizedScyllaSparseSquareGrid
      • ScyllaSparseTriGrid<TCell>
      • ScyllaSparseTriGrid<TCell>.Builder
      • ScyllaSparseTriGrid<TCell>.Enumerator
      • ScyllaSparseTriGrid<TCell>.SynchronizedScyllaSparseTriGrid
      • ScyllaSquareGrid<TCell>
      • ScyllaSquareGrid<TCell>.Builder
      • ScyllaSquareGrid<TCell>.Enumerator
      • ScyllaSquareGrid<TCell>.SynchronizedScyllaSquareGrid
      • ScyllaStackDOTS<T>
      • ScyllaStackDOTS<T>.Builder
      • ScyllaStack<T>
      • ScyllaStack<T>.Builder
      • ScyllaStack<T>.Enumerator
      • ScyllaStack<T>.SynchronizedScyllaStack
      • ScyllaStateBase<TContext>
      • ScyllaStateMachine<TContext>
      • ScyllaTransition<TContext>
      • ScyllaTriGrid<TCell>
      • ScyllaTriGrid<TCell>.Builder
      • ScyllaTriGrid<TCell>.Enumerator
      • ScyllaTriGrid<TCell>.SynchronizedScyllaTriGrid
      • ScyllaTrie
      • ScyllaTrie.Builder
      • ScyllaTrie.SynchronizedScyllaTrie
      • ScyllaTrie<TValue>
      • ScyllaTrie<TValue>.Builder
      • ScyllaTrie<TValue>.SynchronizedScyllaTrie
      • ScyllaTypeMap
      • ScyllaTypeMap.Builder
      • ScyllaTypeMap.DiagnosticEntry
      • ScyllaTypeMap.SynchronizedScyllaTypeMap
      • SerializableDictionary<TKey, TValue>
      • SquareAdjacency
      • SquareCoord
      • SquareCornerCoord
      • SquareCornerMap<TData>
      • SquareCornerMap<TData>.Enumerator
      • SquareDistanceMetric
      • SquareEdgeCoord
      • SquareEdgeDirection
      • SquareEdgeMap<TData>
      • SquareEdgeMap<TData>.Enumerator
      • SquareGridLayout
      • TriCoord
      • TriCornerCoord
      • TriCornerMap<TData>
      • TriCornerMap<TData>.Enumerator
      • TriEdgeCoord
      • TriEdgeDirection
      • TriEdgeMap<TData>
      • TriEdgeMap<TData>.Enumerator
      • TriGridLayout
    • Scylla.Core.Time
      • CalendarDefinition
      • CalendarMath
      • ClockDayChangedEvent
      • ClockDebugInfo
      • ClockDefinition
      • ClockEraChangedEvent
      • ClockEvent
      • ClockEventKind
      • ClockHourChangedEvent
      • ClockMinuteChangedEvent
      • ClockMonthChangedEvent
      • ClockPausedEvent
      • ClockRegisteredEvent
      • ClockResumedEvent
      • ClockSeasonChangedEvent
      • ClockSecondChangedEvent
      • ClockState
      • ClockTickEvent
      • ClockTimeScaleChangedEvent
      • ClockUnregisteredEvent
      • ClockWeekdayChangedEvent
      • ClockYearChangedEvent
      • EraDefinition
      • GameDate
      • IClockListener
      • IClockSource
      • IEraConditionProvider
      • ILocationProfile
      • INetworkTimeSyncStrategy
      • ITimeListener
      • LeapYearRule
      • MasterTimeState
      • MonthDefinition
      • PauseMode
      • ScheduleExtensions
      • ScheduleMode
      • ScheduledTickHandle
      • ScyllaClock
      • ScyllaTime
      • ScyllaTimeConfiguration
      • ScyllaTimeDebugInfo
      • SeasonDefinition
      • SmoothTimeScaleTransition
      • TimeEffectHandle
      • TimeEffects
      • TimeEvent
      • TimeScaleBlendMode
      • TimeScaleModifier
      • TimeScaleModifierHandle
      • TimeScaleModifierStack
      • TimeScaleModifierState
      • TimeTickRunner
      • WeekdayDefinition
    • Scylla.Core.Util
      • ArrayUtil
      • AssemblyUtil
      • CameraUtil
      • CollectionUtil
      • ColorUtil
      • ComponentUtil
      • DateUtil
      • DebugCamera
      • FontUtil
      • FontVariant
      • GameObjectExtensions
      • GameObjectUtil
      • InterfaceUtil
      • Interpolation
      • LightUtil
      • LitMaterialDescriptor
      • ManualResetEventEx
      • MaterialUtil
      • NumberExtensions
      • NumberUtil
      • OptionalPackages
      • PlatformUtil
      • ResourceUtil
      • SpriteUtil
      • StringUtil
      • TabularText
      • TabularText.Builder
      • TestTextGenerator
      • ThreadUtil
      • TimeUtil
      • Timer
      • TransformExtensions
      • TypeUtil
      • UnicodeRange
      • VirtualTransform
    • Scylla.Core.Util.Addressables
      • AddressableErrorCode
      • AddressableException
      • AddressableExtensions
      • AddressableProgress
      • AddressableResult
      • AddressableResult<T>
      • AddressableSettings
      • ManagedAddressableList<T>
      • ManagedAddressable<T>
      • ScyllaAddressables
    • Scylla.Core.Util.Checksum
      • ChecksumAdler32
      • ChecksumCRC16
      • ChecksumCRC32
      • ChecksumFletcher32
      • ChecksumXXHash32
      • ChecksumXXHash64
      • IChecksum
    • Scylla.Core.Util.Compression
      • ArchiveEntryInfo
      • CompressionAlgorithm
      • CompressionErrorCode
      • CompressionException
      • CompressionExtensions
      • CompressionLevel
      • CompressionProgress
      • CompressionResult
      • CompressionResult<T>
      • CompressionSettings
      • IArchiveProvider
      • ICompressionProvider
      • ScyllaCompression
    • Scylla.Core.Util.Crypto
      • CryptoAlgorithm
      • CryptoErrorCode
      • CryptoException
      • CryptoExtensions
      • CryptoSettings
      • ICryptoProvider
      • KeyDerivationHash
      • KeyDerivationSettings
      • ScyllaCrypto
    • Scylla.Core.Util.DebugDraw
      • DebugDraw
      • DebugDrawSpace
      • DebugDrawTextAlign
    • Scylla.Core.Util.Effects
      • ColorAnimationText
      • ColorAnimationTextDirection
      • ColorAnimationTextGradient
    • Scylla.Core.Util.File
      • ConfigFile
      • ConfigFileGroup
      • ConfigFileProperty
      • ConfigFilePropertyType
      • ConfigFileUtil
      • FileErrorCode
      • FileException
      • FileExtensions
      • FilePathExtensions
      • FilePathUtil
      • FileProgress
      • FileSettings
      • ImageFileFormat
      • ImageFileSettings
      • ScyllaFileUtil
    • Scylla.Core.Util.Geom
      • AABB3D
      • BarrelColoringMode
      • BollardColoringMode
      • CappedWallColoringMode
      • Capsule3D
      • ColliderMode
      • CrateColoringMode
      • Ellipse
      • FaceColoringMode
      • IFaceColorResolver
      • OBB3D
      • PaletteFaceColorResolver
      • PaneledWall1ColoringMode
      • PaneledWall2ColoringMode
      • PipeSegmentColoringMode
      • RoundedBoxColoringMode
      • ScyllaArchwayShape
      • ScyllaBarrelShape
      • ScyllaBollardShape
      • ScyllaBoxShape
      • ScyllaCappedWallShape
      • ScyllaCapsuleShape
      • ScyllaColumnShape
      • ScyllaConeShape
      • ScyllaCrateShape
      • ScyllaCurvedStairsShape
      • ScyllaCylinderShape
      • ScyllaDomeShape
      • ScyllaFloorTileShape
      • ScyllaIcoSphereShape
      • ScyllaLadderShape
      • ScyllaLinearStairsShape
      • ScyllaOctahedronShape
      • ScyllaPaneledWall1Shape
      • ScyllaPaneledWall2Shape
      • ScyllaPipeSegmentShape
      • ScyllaPipeShape
      • ScyllaPlaneShape
      • ScyllaPyramidShape
      • ScyllaQuadShape
      • ScyllaRampShape
      • ScyllaRingShape
      • ScyllaRoundedBoxShape
      • ScyllaShapeBase3D
      • ScyllaShapes
      • ScyllaShelvedWallShape
      • ScyllaSignShape
      • ScyllaSkirtedWallShape
      • ScyllaSkyDomeShape
      • ScyllaSphereShape
      • ScyllaSpiralStairsShape
      • ScyllaTorusShape
      • ScyllaTriangularPrismShape
      • ScyllaWallShape
      • ScyllaWallWithDoorShape
      • ScyllaWallWithWindowShape
      • ShapeMaterialCache
      • ShelvedWallColoringMode
      • SignColoringMode
      • Size2D
      • Size3D
      • SkirtedWallColoringMode
      • Sphere3D
      • StairsColoringMode
      • UniformColorResolver
    • Scylla.Core.Util.Math
      • Complex
      • MathUtil
      • Monomial
      • Polynomial
    • Scylla.Core.Util.Noise
      • CellularDistanceType
      • CellularReturnType
      • CellularSettings
      • FractalType
      • NoiseAlgorithm
      • NoiseCurlSampler
      • NoiseDomainWarper
      • NoiseGenerator
      • NoiseSettings
      • PixelNoise
      • PixelNoiseDistribution
      • PixelNoiseSettings
      • WarpSettings
    • Scylla.Core.Util.Palette
      • ColorAssetRegistry
      • ColorGradient
      • ColorGradientAlphaStop
      • ColorGradientAlphaStopData
      • ColorGradientAsset
      • ColorGradientColorSpace
      • ColorGradientData
      • ColorGradientMode
      • ColorGradientStop
      • ColorGradientStopData
      • ColorGradientStopInterpolation
      • ColorPalette
      • ColorPaletteAsset
      • ColorPaletteData
      • ColorPaletteEntry
      • ColorPaletteEntryData
      • ColorPaletteMapping
      • ColorRole
      • ColorStopBlendMode
      • ColorSwatchCollection
      • ColorSwatchCollectionAsset
      • ColorSwatchCollectionData
      • ColorSwatchEntryData
      • MutableColorGradient
      • MutableColorPalette
    • Scylla.Core.Util.ProceduralMapGen
      • BSPSettings
      • CellularAutomataSettings
      • CorridorStyle
      • DoorAxis
      • DoorPlacement
      • DoorPlacementSettings
      • DoorShapeConfig
      • DrunkardWalkSettings
      • FloorplanSettings
      • InstantiationResult
      • MapCellType
      • MapCorridor<TCoord>
      • MapGenResult<TCoord>
      • MapGenSettings
      • MapOverlaySettings
      • MapPatternType
      • MapRoom<TCoord>
      • MazeRoomSettings
      • MazeSettings
      • NoiseThresholdSettings
      • ProceduralMapGenerator
      • ProceduralMapOverlay
      • ProceduralMapPostProcessor
      • RoomCorridorSettings
      • RoomGroup
      • ScyllaProceduralMapInstantiator
      • VoronoiRegionSettings
      • WindingCorridorSettings
    • Scylla.Core.Util.Random
      • AliasTable
      • CryptoRandomSource
      • DiceRoll
      • IProbabilityInfluence
      • IRandomSource
      • MersenneTwister
      • MersenneTwisterState
      • PCG32
      • PCG32State
      • PickHistory
      • PickRecord
      • PoissonDiskSampler
      • PoissonDiskSampler.BoundChecker
      • ProbabilityEntry<T>
      • ProbabilityList<T>
      • ProbabilityNormalizer
      • RandomAlgorithm
      • RandomExtensions
      • RandomID
      • RandomSeeder
      • RandomText
      • RandomUtil
      • RandomUtil.DeterministicRNG
      • RandomUtil.DeterministicRNGState
      • RepeatPreventionMode
      • SelectionStrategy
      • SplitMix64RNG
      • SplitMix64State
      • SystemRandomSource
      • UnityRandomSource
      • Xoroshiro128Plus
      • Xoroshiro128State
      • Xoshiro256StarStar
      • Xoshiro256State
    • Scylla.Core.Util.Ranges
      • DoubleRange
      • FloatRange
      • IntRange
    • Scylla.Core.Util.Serialization
      • ArraySerializer<T>
      • BoolSerializer
      • BoundsSerializer
      • ByteArraySerializer
      • ByteSerializer
      • CharSerializer
      • Color32Serializer
      • ColorSerializer
      • DateTimeOffsetSerializer
      • DateTimeSerializer
      • DecimalSerializer
      • DefaultValueHandling
      • DictionarySerializer<TKey, TValue>
      • DoubleSerializer
      • EnumSerializer<T>
      • FloatSerializer
      • GuidSerializer
      • HashSetSerializer<T>
      • IScyllaReader
      • IScyllaWriter
      • ISerializationContext
      • ITypeSerializer
      • ITypeSerializer<T>
      • IntSerializer
      • LayerMaskSerializer
      • ListSerializer<T>
      • LongSerializer
      • NullHandling
      • PropertyMetadata
      • QuaternionSerializer
      • QueueSerializer<T>
      • RectIntSerializer
      • RectSerializer
      • ReferenceHandling
      • ReferenceTracker
      • ReflectionSerializer
      • SByteSerializer
      • ScyllaIgnoreAttribute
      • ScyllaIncludeAttribute
      • ScyllaJSONReader
      • ScyllaJSONWriter
      • ScyllaMigrationAttribute
      • ScyllaPropertyAttribute
      • ScyllaSerializableAttribute
      • ScyllaSerialization
      • SerializationContext
      • SerializationEngine
      • SerializationException
      • SerializationFormat
      • SerializationResult
      • SerializationResult<T>
      • SerializationSettings
      • SerializationSettings.Builder
      • SerializationToken
      • ShortSerializer
      • StackSerializer<T>
      • StringSerializer
      • TimeSpanSerializer
      • TypeMetadata
      • TypeMetadataCache
      • TypeSerializerAdapter<T>
      • TypeSerializerBase<T>
      • UIntSerializer
      • ULongSerializer
      • UShortSerializer
      • Vector2IntSerializer
      • Vector2Serializer
      • Vector3IntSerializer
      • Vector3Serializer
      • Vector4Serializer
    • Scylla.Core.Util.Tween
      • Ease
      • EaseType
      • ITween
      • LoopType
      • ScyllaShapeTweenExtensions
      • ScyllaTween
      • SequenceItem
      • SequenceItemType
      • TweenAudioSourceExtensions
      • TweenBase
      • TweenCanvasGroupExtensions
      • TweenColor
      • TweenErrorCode
      • TweenException
      • TweenExtensions
      • TweenFloat
      • TweenID
      • TweenLerp
      • TweenManager
      • TweenMaterialExtensions
      • TweenPool
      • TweenQuaternion
      • TweenRectTransformExtensions
      • TweenSequence
      • TweenSettings
      • TweenSpriteRendererExtensions
      • TweenState
      • TweenTransformExtensions
      • TweenVector2
      • TweenVector3
      • TweenVector4
      • Tween<T>
    • Scylla.Core.Util.UI
      • DebugCanvasUtil
      • GradientBackground
      • IUIText
      • IUITextField
      • LineScrollTextArea
      • LineScrollTextAreaBuilder
      • LineScrollTextBuffer
      • LineScrollTextBuffer.Builder
      • LineScrollTextBuffer.LogicalLine
      • LineScrollTextBufferLineAddedEvent
      • LineScrollTextBufferScrolledEvent
      • LineScrollWindow
      • LineScrollWindow.Enumerator
      • ScrollDirection
      • ScrollPhysics
      • ScrollTextArea
      • ScrollTextAreaBuilder
      • ScrollTextAreaDragEndedEvent
      • ScrollTextAreaDragStartedEvent
      • ScrollTextAreaScrolledEvent
      • ScrollTextBuffer
      • ScrollTextBuffer.Builder
      • ScrollTextBuffer.ScrollTextLine
      • ScrollTextBufferLineAddedEvent
      • ScrollTextLineView
      • ScyllaScrollRect
      • ScyllaUIAdaptiveStack
      • ScyllaUIAlignment
      • ScyllaUIAspectBreakpoint
      • ScyllaUICrossAlignment
      • ScyllaUIEdgeInsets
      • ScyllaUIFitMode
      • ScyllaUIFlexElement
      • ScyllaUIGrid
      • ScyllaUIGridItem
      • ScyllaUIHStack
      • ScyllaUILayoutAnimator
      • ScyllaUILayoutDebugDraw
      • ScyllaUILayoutDebugDrawConfig
      • ScyllaUILayoutGizmos
      • ScyllaUILayoutRoot
      • ScyllaUILayoutStyle
      • ScyllaUILength
      • ScyllaUILengthUnit
      • ScyllaUIPositioned
      • ScyllaUIScreenMargin
      • ScyllaUISizeMode
      • ScyllaUISpacer
      • ScyllaUIStackBase
      • ScyllaUIText
      • ScyllaUITextGroup
      • ScyllaUITrack
      • ScyllaUITrackSizingMode
      • ScyllaUIVStack
      • ScyllaUIZStack
      • TMPSettings
      • TMPUtil
      • TextSelectionPosition
      • TextSelectionRange
      • UIAlignment
      • UIAnchor
      • UIAnchors
      • UIFontReference
      • UIFontStyle
      • UIMargin
      • UIPadding
      • UITextBuilder
      • UITextComponent
      • UITextFactory
      • UITextFieldBuilder
      • UITextFieldComponent
      • UIUtil
      • VisualLine
    • Scylla.Core.Util.Units
      • AreaUnit
      • DataUnit
      • LengthUnit
      • MassUnit
      • PressureUnit
      • SpeedUnit
      • TemperatureUnit
      • TimeFormat
      • TimeUnit

    Class StringUtil

    Provides a comprehensive set of string utility methods and extension methods for common string operations used throughout Scylla, including stable hashing, sanitization, JSON escaping, null/whitespace guards, ordinal comparison helpers, safe slicing, line-ending normalization, invariant-culture formatting and parsing, truncation, padding, and Unity Rich Text tag generation.

    Inheritance
    object
    StringUtil
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.Core.Util
    Assembly: ScyllaCore.dll
    Syntax
    public static class StringUtil
    Remarks

    All string comparison and search methods default to Ordinal rather than culture-sensitive comparison. This is intentional: ordinal comparisons are faster, produce consistent results across locales, and are appropriate for identifiers, file paths, and serialized data - the primary use cases in a game framework.

    Extension methods are defined on string and can be invoked directly on any string instance (e.g., myString.SafeSubstring(0, 10)). Static (non-extension) helpers take their primary string as the first parameter.

    The FNV-1a hash produced by GetStableHash32(string, bool) is deterministic across platforms and process restarts, unlike string.GetHashCode() which is randomized in .NET 5+ to prevent hash-flooding attacks.

    Methods

    Bold(string)

    Wraps the given string in HTML bold tags. If the input is null, an empty string is wrapped in bold tags instead.

    Declaration
    public static string Bold(string text)
    Parameters
    Type Name Description
    string text

    The input string to be wrapped in bold tags; may be null.

    Returns
    Type Description
    string

    A string wrapped in bold tags. If the input is null, an empty bold tag is produced.

    Color(string, Color32, bool)

    Wraps the given text in a color tag using the specified color, optionally including the alpha channel.

    Declaration
    public static string Color(string text, Color32 color, bool includeAlpha = true)
    Parameters
    Type Name Description
    string text

    The string to be wrapped in the color tag. If null, an empty string is used.

    Color32 color

    The color to apply to the text, represented as a UnityEngine.Color32.

    bool includeAlpha

    Determines whether the alpha channel should be included in the color's hex representation. Default is true.

    Returns
    Type Description
    string

    A string wrapped in a color tag with the specified color.

    ContainsOrdinal(string, string)

    Determines whether the specified string contains the given value using ordinal comparison.

    Declaration
    public static bool ContainsOrdinal(this string s, string value)
    Parameters
    Type Name Description
    string s

    The string to search within; can be null.

    string value

    The string to search for; can be null.

    Returns
    Type Description
    bool

    true if the specified value is found within the string; otherwise, false.

    ContainsOrdinalIgnoreCase(string, string)

    Determines whether the specified string contains the given value using an ordinal, case-insensitive comparison.

    Declaration
    public static bool ContainsOrdinalIgnoreCase(this string s, string value)
    Parameters
    Type Name Description
    string s

    The string to search within.

    string value

    The string to locate within s.

    Returns
    Type Description
    bool

    true if value is found in s; otherwise, false.

    CountOccurrences(string, string, StringComparison)

    Counts the number of occurrences of a specified substring within the given string, based on the specified string comparison option.

    Declaration
    public static int CountOccurrences(this string s, string value, StringComparison comparison)
    Parameters
    Type Name Description
    string s

    The string in which to search for the substring; can be null or empty.

    string value

    The substring to count occurrences of; cannot be null or empty.

    StringComparison comparison

    The string comparison option to use while matching the substring.

    Returns
    Type Description
    int

    The number of times the substring appears in the string, or 0 if the string is null or empty.

    EmptyIfNull(string)

    Returns the specified string, or an empty string if the input is null.

    Declaration
    public static string EmptyIfNull(this string s)
    Parameters
    Type Name Description
    string s

    The input string to check; may be null.

    Returns
    Type Description
    string

    The original string if not null, otherwise an empty string.

    EndsWithOrdinal(string, string)

    Determines whether the end of the specified string instance matches the specified suffix, using ordinal comparison.

    Declaration
    public static bool EndsWithOrdinal(this string s, string suffix)
    Parameters
    Type Name Description
    string s

    The string to evaluate; may be null.

    string suffix

    The string to compare to the end of the input string; cannot be null.

    Returns
    Type Description
    bool

    True if the string ends with the specified suffix using ordinal comparison; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if suffix is null.

    EndsWithOrdinalIgnoreCase(string, string)

    Determines whether the end of the specified string instance matches a specified suffix, using a case-insensitive ordinal comparison.

    Declaration
    public static bool EndsWithOrdinalIgnoreCase(this string s, string suffix)
    Parameters
    Type Name Description
    string s

    The string to examine. This can be null, in which case the method returns false.

    string suffix

    The suffix to compare to the end of this string. Cannot be null.

    Returns
    Type Description
    bool

    True if the end of the string matches the specified suffix; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when the suffix is null.

    EqualsOrdinal(string, string)

    Determines whether two strings are equal using ordinal comparison.

    Declaration
    public static bool EqualsOrdinal(string a, string b)
    Parameters
    Type Name Description
    string a

    The first string to compare; may be null.

    string b

    The second string to compare; may be null.

    Returns
    Type Description
    bool

    true if the strings are equal using ordinal comparison; otherwise, false.

    EqualsOrdinalIgnoreCase(string, string)

    Determines whether two strings are equal, using a case-insensitive ordinal comparison.

    Declaration
    public static bool EqualsOrdinalIgnoreCase(string a, string b)
    Parameters
    Type Name Description
    string a

    The first string to compare; may be null.

    string b

    The second string to compare; may be null.

    Returns
    Type Description
    bool

    True if both strings are equal when compared using a case-insensitive ordinal comparison; otherwise, false.

    EscapeJSONString(string)

    Escapes special characters in a string for use in JSON string values. Escapes quotes, backslashes, control characters, and common escape sequences according to JSON specification.

    Declaration
    public static string EscapeJSONString(string value)
    Parameters
    Type Name Description
    string value

    The string value to escape. Can be null or empty.

    Returns
    Type Description
    string

    The escaped JSON string safe for embedding in JSON. Returns an empty string if the input is null or empty.

    Remarks

    This method performs manual JSON string escaping for performance (no external dependencies). Escapes the following characters:

    • " (quote) -> "
    • \ (backslash) -> \
    • \b (backspace) -> \b
    • \f (form feed) -> \f
    • \n (newline) -> \n
    • \r (carriage return) -> \r
    • \t (tab) -> \t
    • Control characters (0x00-0x1F) -> \uXXXX

    EscapeRichText(string)

    Escapes special characters in a string for use in rich text by replacing '&', '<', and '>' with their corresponding HTML character entities.

    Declaration
    public static string EscapeRichText(this string s)
    Parameters
    Type Name Description
    string s

    The input string to escape; may be null.

    Returns
    Type Description
    string

    A new string with '&', '<', and '>' replaced by "&amp;", "&lt;", and "&gt;" respectively, or the original string if no special characters are present. Returns null if the input is null.

    GetStableHash32(string, bool)

    Computes a stable, deterministic 32-bit hash for the specified string using the FNV-1a (Fowler-Noll-Vo) algorithm. Unlike string.GetHashCode(), which is randomized per-process in .NET 5+ to mitigate hash-flooding attacks, this hash produces the same value for the same input across all platforms, runtimes, and application restarts.

    Declaration
    public static uint GetStableHash32(string s, bool ignoreCase = false)
    Parameters
    Type Name Description
    string s

    The input string to hash. Returns 0 for null or empty strings.

    bool ignoreCase

    true to perform a case-insensitive hash (characters are uppercased before being mixed in). Defaults to false.

    Returns
    Type Description
    uint

    A deterministic 32-bit unsigned integer hash of the string, or 0 if s is null or empty.

    Remarks

    FNV-1a is not a cryptographic hash; do not use it for security-sensitive purposes. It is well-suited for dictionary keys, content-addressable caches, and fast string-to-integer mapping in game logic. The offset basis is 2166136261 and the prime multiplier is 16777619.

    When ignoreCase is true, each character is converted to uppercase via ToUpperInvariant(char) before hashing, ensuring that "Hello" and "hello" produce the same hash regardless of locale.

    HasText(string)

    Determines whether the given string contains non-whitespace characters.

    Declaration
    public static bool HasText(this string s)
    Parameters
    Type Name Description
    string s

    The input string to evaluate; may be null, empty, or contain only whitespace.

    Returns
    Type Description
    bool

    True if the string is not null, not empty, and contains at least one non-whitespace character; otherwise, false.

    IndentLines(string, string, bool)

    Indents each line of the given string by the specified indent string. Optionally, empty lines can also be indented.

    Declaration
    public static string IndentLines(this string s, string indent, bool indentEmptyLines = false)
    Parameters
    Type Name Description
    string s

    The input string whose lines are to be indented.

    string indent

    The string to prepend to the beginning of each line.

    bool indentEmptyLines

    Indicates whether to prepend the indent string to empty lines; if false, empty lines remain unchanged.

    Returns
    Type Description
    string

    A new string with each line indented by the specified indent string. If the input string is null, returns null.

    IndexOf(string, string, StringComparison)

    Returns the zero-based index of the first occurrence of a specified string in the current string, using the specified comparison option.

    Declaration
    public static int IndexOf(this string s, string value, StringComparison comparison)
    Parameters
    Type Name Description
    string s

    The string instance to search; may be null.

    string value

    The string to locate within the current string; cannot be null.

    StringComparison comparison

    The comparison rules to use when locating the string.

    Returns
    Type Description
    int

    The zero-based index position of the first occurrence of the specified string, or -1 if the string is not found or the input string is null.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when the value parameter is null.

    IsValidFileName(string)

    Determines whether a string is usable as a file name on every major platform (Windows, macOS, and Linux).

    Declaration
    public static bool IsValidFileName(string name)
    Parameters
    Type Name Description
    string name

    The file name to test, without any directory component. May include an extension.

    Returns
    Type Description
    bool

    true when name is safe to write to disk on all three platforms; otherwise false.

    Remarks

    A name is rejected when it is null, empty, or whitespace-only, when it contains a character rejected by IsValidFileNameChar(char), when it ends in a period or a space (Windows silently strips both, so the name written is not the name requested), or when its stem matches one of the Windows reserved device names.

    The reserved names are CON, PRN, AUX, NUL, COM1 through COM9, and LPT1 through LPT9. The comparison is case-insensitive and applies to the stem only, so both "nul" and "NUL.txt" are rejected while "NULL" and "CONFIG" are accepted.

    This is the whole-name counterpart to IsValidFileNameChar(char). To repair a name rather than reject it, use SanitizeForFileName(string, char) (substitutes a replacement character) or StripInvalidFileNameChars(string, bool) (removes offending characters).

    See Also
    IsValidFileNameChar(char)
    SanitizeForFileName(string, char)

    IsValidFileNameChar(char)

    Determines whether a single character is legal inside a file name on every major platform (Windows, macOS, and Linux).

    Declaration
    public static bool IsValidFileNameChar(char c)
    Parameters
    Type Name Description
    char c

    The character to test.

    Returns
    Type Description
    bool

    true when c may appear anywhere in a cross-platform file name; false for control characters (U+0000 to U+001F) and for any character in the cross-platform invalid set (<, >, :, ", /, backslash, |, ?, *).

    Remarks

    Letters outside ASCII (umlauts, accents, CJK) and punctuation such as the apostrophe are legal on all three platforms and therefore return true. Whether a character is legal in a given position is a separate question: a trailing period or space is rejected on Windows even though both characters pass this test. Use IsValidFileName(string) for the whole-name rules.

    See Also
    IsValidFileName(string)
    StripInvalidFileNameChars(string, bool)

    Italic(string)

    Wraps the given text in HTML italic tags ("<i>").

    Declaration
    public static string Italic(string text)
    Parameters
    Type Name Description
    string text

    The text to wrap; can be null.

    Returns
    Type Description
    string

    The input text wrapped in HTML italic tags, or an empty italic tag if the input is null.

    Left(string, int)

    Returns the left-most portion of the string with the specified number of characters. If the specified count exceeds the string's length, the entire string is returned.

    Declaration
    public static string Left(this string s, int count)
    Parameters
    Type Name Description
    string s

    The input string from which to extract the left substring.

    int count

    The number of characters to include in the left substring.

    Returns
    Type Description
    string

    A substring containing the left-most characters of the input string, or the original string if the count exceeds its length.

    NormalizeLineEndings(string, string)

    Normalizes all line endings in the specified string to the provided newline format. Converts Windows-style ("\r\n") and old Mac-style ("\r") line endings to Unix-style ("\n") before applying the specified newline format.

    Declaration
    public static string NormalizeLineEndings(this string s, string newline = "\n")
    Parameters
    Type Name Description
    string s

    The input string whose line endings are to be normalized; may be null.

    string newline

    The desired newline format to replace normalized line endings with. Defaults to Unix-style ("\n").

    Returns
    Type Description
    string

    The input string with normalized line endings converted to the specified newline format. If the input string is null, returns null. If the input string is empty, returns an empty string.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if newline is null.

    NullIfEmpty(string)

    Returns null if the input string is null or empty; otherwise, returns the original string.

    Declaration
    public static string NullIfEmpty(this string s)
    Parameters
    Type Name Description
    string s

    The input string to evaluate.

    Returns
    Type Description
    string

    Null if the input string is null or empty; otherwise, the original string.

    NullIfWhiteSpace(string)

    Returns null if the input string is null, empty, or consists only of white-space characters; otherwise, returns the original string.

    Declaration
    public static string NullIfWhiteSpace(this string s)
    Parameters
    Type Name Description
    string s

    The input string to evaluate; may be null.

    Returns
    Type Description
    string

    Null if the input string is null, empty, or contains only white-space characters; otherwise, the original string.

    Remove(string, string, StringComparison)

    Removes all occurrences of the specified string from the input string using the specified string comparison.

    Declaration
    public static string Remove(this string s, string value, StringComparison comparison)
    Parameters
    Type Name Description
    string s

    The input string from which occurrences of the specified value will be removed.

    string value

    The string value to remove from the input string.

    StringComparison comparison

    The type of string comparison to use for matching occurrences to remove.

    Returns
    Type Description
    string

    A new string with all matching occurrences of the specified value removed, or the original string if no matches are found.

    Replace(string, string, string, StringComparison)

    Replaces all occurrences of a specified string in the current string instance with another specified string, using the provided string comparison option.

    Declaration
    public static string Replace(this string s, string oldValue, string newValue, StringComparison comparison)
    Parameters
    Type Name Description
    string s

    The input string in which replacements will be made. May be null.

    string oldValue

    The string to be replaced. Cannot be null or empty.

    string newValue

    The string to replace all occurrences of oldValue. If null, an empty string is used.

    StringComparison comparison

    The comparison option to use for matching strings.

    Returns
    Type Description
    string

    A new string with all occurrences of oldValue replaced with newValue. Returns null if the input string is null.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when oldValue is null.

    ArgumentException

    Thrown when oldValue is empty.

    Right(string, int)

    Returns the specified number of characters from the end of the string. If the string is null or empty, or the count is less than or equal to zero, an empty string is returned.

    Declaration
    public static string Right(this string s, int count)
    Parameters
    Type Name Description
    string s

    The input string to process; may be null or empty.

    int count

    The number of characters to retrieve from the end of the string.

    Returns
    Type Description
    string

    A string containing the last count characters of the input string, or the full string if count is greater than or equal to the string's length, or an empty string if the input is null, empty, or count is less than or equal to zero.

    SafePadCenter(string, int, char)

    Pads the string on both sides to center it within the specified total width. If the padding cannot be evenly distributed, the extra character is added to the right. Safely handles null strings.

    Declaration
    public static string SafePadCenter(this string s, int totalWidth, char paddingChar = ' ')
    Parameters
    Type Name Description
    string s

    The string to center; may be null.

    int totalWidth

    The desired total width of the resulting string.

    char paddingChar

    The character to use for padding. Default is space.

    Returns
    Type Description
    string

    The string centered within the specified width. If the string is already at least as long as totalWidth, the original string is returned unchanged. Returns a string of padding characters if input is null.

    SafePadLeft(string, int, char)

    Pads the string on the left to the specified total width using the specified padding character. Unlike the built-in PadLeft(int), this method safely handles null strings.

    Declaration
    public static string SafePadLeft(this string s, int totalWidth, char paddingChar = ' ')
    Parameters
    Type Name Description
    string s

    The string to pad; may be null.

    int totalWidth

    The desired total width of the resulting string.

    char paddingChar

    The character to use for padding. Default is space.

    Returns
    Type Description
    string

    The string padded on the left to the specified width. If the string is already at least as long as totalWidth, the original string is returned unchanged. Returns a string of padding characters if input is null.

    SafePadRight(string, int, char)

    Pads the string on the right to the specified total width using the specified padding character. Unlike the built-in PadRight(int), this method safely handles null strings.

    Declaration
    public static string SafePadRight(this string s, int totalWidth, char paddingChar = ' ')
    Parameters
    Type Name Description
    string s

    The string to pad; may be null.

    int totalWidth

    The desired total width of the resulting string.

    char paddingChar

    The character to use for padding. Default is space.

    Returns
    Type Description
    string

    The string padded on the right to the specified width. If the string is already at least as long as totalWidth, the original string is returned unchanged. Returns a string of padding characters if input is null.

    SafeSubstring(string, int, int)

    Returns a substring of the input string starting at the specified index and with the specified length. Safely handles cases where the input string is null, empty, or the specified range is out of bounds.

    Declaration
    public static string SafeSubstring(this string s, int startIndex, int length = 2147483647)
    Parameters
    Type Name Description
    string s

    The input string from which to extract the substring.

    int startIndex

    The zero-based starting index of the substring. Values less than zero are clamped to zero.

    int length

    The length of the substring. Defaults to the maximum available length. Values less than or equal to zero return an empty string.

    Returns
    Type Description
    string

    The substring of the input string corresponding to the specified range, or an empty string if the range is invalid or the input string is null/empty.

    SanitizeForFileName(string, char)

    Sanitizes the input string to make it a valid file name by replacing invalid characters with the specified replacement character and removing invalid trailing characters. Uses a cross-platform set of invalid characters to ensure the sanitized filename works on both Windows and macOS/Unix platforms.

    Declaration
    public static string SanitizeForFileName(this string s, char replacement = '_')
    Parameters
    Type Name Description
    string s

    The input string to sanitize. Can be null.

    char replacement

    The character to replace invalid file name characters with. Defaults to '_'.

    Returns
    Type Description
    string

    A sanitized string suitable for use as a file name. Returns an empty string if the input is null or results in an empty string after sanitization.

    Size(string, int)

    Wraps the specified text in a size tag with the provided size value.

    Declaration
    public static string Size(string text, int size)
    Parameters
    Type Name Description
    string text

    The text to wrap; may be null.

    int size

    The size value to apply; must be greater than 0.

    Returns
    Type Description
    string

    The text wrapped in size tags, or an empty size tag if the text is null.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if the size is less than or equal to 0.

    SplitCamelCase(string, char)

    Inserts a separator at every word boundary in a camelCase or PascalCase identifier.

    Declaration
    public static string SplitCamelCase(this string s, char separator = ' ')
    Parameters
    Type Name Description
    string s

    The identifier to split. null and empty are returned unchanged.

    char separator

    The character to insert at each boundary.

    Returns
    Type Description
    string

    The identifier with separators inserted, or the original string when it has no boundary.

    Remarks

    Purely mechanical, and deliberately has no opinion about casing: the result keeps the characters it was given and only gains separators. A caller wanting title case or upper case applies it afterwards.

    Three boundaries are recognized. An ordinary hump, where a lowercase letter is followed by an uppercase one, so upArrow becomes up Arrow. The end of a run of capitals, recognized as the last capital before a lowercase letter, so XRController becomes XR Controller rather than X R Controller. And a digit following a word of more than one letter, so numpad1 becomes numpad 1 while f1 is left alone, because a single letter before a number is nearly always one name rather than two.

    Nothing is inserted after a character that is neither a letter nor a digit, so text that already contains separators or punctuation is not given a second one.

    The builder is allocated only once a boundary is actually found, so a single-word identifier, which is the common case, returns the original instance and allocates nothing.

    StartsWithOrdinal(string, string)

    Determines whether the beginning of the specified string instance matches the specified prefix using ordinal comparison.

    Declaration
    public static bool StartsWithOrdinal(this string s, string prefix)
    Parameters
    Type Name Description
    string s

    The string to compare; if null, the method returns false.

    string prefix

    The prefix to compare against; cannot be null.

    Returns
    Type Description
    bool

    True if the beginning of the string instance matches the prefix using ordinal comparison; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when the prefix is null.

    StartsWithOrdinalIgnoreCase(string, string)

    Determines if the specified string starts with the given prefix, using case-insensitive ordinal comparison.

    Declaration
    public static bool StartsWithOrdinalIgnoreCase(this string s, string prefix)
    Parameters
    Type Name Description
    string s

    The input string to check; may be null.

    string prefix

    The prefix to compare; should not be null.

    Returns
    Type Description
    bool

    True if the string starts with the specified prefix; otherwise, false. Returns false if the input string is null.

    Strikethrough(string)

    Adds a strikethrough effect to the specified text by wrapping it in strikethrough tags.

    Declaration
    public static string Strikethrough(string text)
    Parameters
    Type Name Description
    string text

    The text to be wrapped in strikethrough tags. If null, an empty string will be used.

    Returns
    Type Description
    string

    The input text wrapped in "" and "" tags.

    StripInvalidFileNameChars(string, bool)

    Removes every character that is illegal in a cross-platform file name, along with any resulting trailing periods and spaces.

    Declaration
    public static string StripInvalidFileNameChars(string name, bool trimTrailing = true)
    Parameters
    Type Name Description
    string name

    The string to filter. May be null.

    bool trimTrailing

    true (the default) to also trim trailing periods and spaces; false to filter characters only and leave the tail alone.

    Returns
    Type Description
    string

    A copy of name containing only characters accepted by IsValidFileNameChar(char), with trailing periods and spaces trimmed unless trimTrailing is false. Returns an empty string when the input is null, empty, or filters down to nothing.

    Remarks

    This differs from SanitizeForFileName(string, char) in what it does with a rejected character: SanitizeForFileName substitutes a replacement character ('_' by default), this method drops it. Removal is the right behavior for a live text-field filter, where substitution would insert an underscore on every rejected keystroke.

    Pass false for trimTrailing when filtering a field as the user types. The trailing rule is a whole-string rule, and applying it per keystroke makes a name ending in a space or a period impossible to type: the character is removed the moment it is entered, so the user can never get to the one that would follow it. Filter per keystroke, trim once on commit.

    The result may still be a Windows reserved device name; that rule cannot be enforced per character. Check the committed value with IsValidFileName(string).

    See Also
    SanitizeForFileName(string, char)
    IsValidFileName(string)

    StripRichTextTags(string)

    Removes all rich-text tags (HTML-like tags enclosed in angle brackets) from the specified string, returning the plain text content.

    Declaration
    public static string StripRichTextTags(this string s)
    Parameters
    Type Name Description
    string s

    The input string that may contain rich-text tags; may be null.

    Returns
    Type Description
    string

    The input string with all rich-text tags removed, or null if the input string is null.

    ToStringInvariant(decimal)

    Converts the specified decimal value to its string representation using the invariant culture.

    Declaration
    public static string ToStringInvariant(decimal value)
    Parameters
    Type Name Description
    decimal value

    The decimal value to convert.

    Returns
    Type Description
    string

    A string representation of the decimal value using the invariant culture.

    ToStringInvariant(double)

    Converts a double value to its string representation using the invariant culture.

    Declaration
    public static string ToStringInvariant(double value)
    Parameters
    Type Name Description
    double value

    The double value to convert.

    Returns
    Type Description
    string

    The string representation of the double value in invariant culture format.

    ToStringInvariant(int)

    Converts the specified integer value to its string representation using invariant culture.

    Declaration
    public static string ToStringInvariant(int value)
    Parameters
    Type Name Description
    int value

    The integer value to convert.

    Returns
    Type Description
    string

    The string representation of the integer, formatted using invariant culture.

    ToStringInvariant(long)

    Converts the specified long value to its string representation using the invariant culture format.

    Declaration
    public static string ToStringInvariant(long value)
    Parameters
    Type Name Description
    long value

    The long value to convert to a string.

    Returns
    Type Description
    string

    The string representation of the specified value in invariant culture format.

    ToStringInvariant(object)

    Converts the given object to its string representation using the invariant culture. If the object is null, it returns a predefined "Null" string.

    Declaration
    public static string ToStringInvariant(object value)
    Parameters
    Type Name Description
    object value

    The object to be converted to a string; can be null.

    Returns
    Type Description
    string

    The string representation of the object in invariant culture, or "Null" if the object is null.

    ToStringInvariant(float)

    Converts a floating-point value to its string representation using invariant culture formatting.

    Declaration
    public static string ToStringInvariant(float value)
    Parameters
    Type Name Description
    float value

    The floating-point value to convert.

    Returns
    Type Description
    string

    A string representation of the value formatted using invariant culture.

    TrimToEmpty(string)

    Trims the input string and returns the result, or an empty string if the input is null.

    Declaration
    public static string TrimToEmpty(this string s)
    Parameters
    Type Name Description
    string s

    The input string to trim; may be null.

    Returns
    Type Description
    string

    A trimmed version of the string if not null, otherwise an empty string.

    TrimToNull(string)

    Trims the input string of leading and trailing whitespace, returning null if the resulting string is either null or empty.

    Declaration
    public static string TrimToNull(this string s)
    Parameters
    Type Name Description
    string s

    The input string to trim; may be null or consist of only whitespace.

    Returns
    Type Description
    string

    The trimmed string if it contains non-whitespace characters, otherwise null.

    Truncate(string, int, string)

    Truncates the string to the specified maximum length, appending an ellipsis indicator if truncation occurs. The ellipsis is included in the maximum length.

    Declaration
    public static string Truncate(this string s, int maxLength, string ellipsis = "...")
    Parameters
    Type Name Description
    string s

    The string to truncate; may be null.

    int maxLength

    Maximum length of the result including ellipsis. Must be at least 1.

    string ellipsis

    The ellipsis string to append when truncating. Default is "...".

    Returns
    Type Description
    string

    The truncated string with ellipsis if the original exceeded maxLength, or the original string if it was shorter. Returns empty string if input is null.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if maxLength is less than 1.

    ArgumentNullException

    Thrown if ellipsis is null.

    TryParseBool(string, out bool)

    Attempts to convert a human-readable string representation to its bool equivalent, accepting a broader set of truthy and falsy representations than TryParse(ReadOnlySpan<char>, out bool).

    Declaration
    public static bool TryParseBool(string s, out bool value)
    Parameters
    Type Name Description
    string s

    The string to parse. null, empty, and whitespace-only strings all return false with value set to false.

    bool value

    When this method returns true, contains the parsed boolean. When this method returns false, contains false.

    Returns
    Type Description
    bool

    true if the string was successfully recognized as a boolean value; false if the string is null, empty, or does not match any recognized pattern.

    Remarks

    The following string values are recognised (case-insensitive, leading/trailing whitespace trimmed):

    • Truthy: true, t, yes, y, on, 1
    • Falsy: false, f, no, n, off, 0

    Any value not in the above table is passed to TryParse(ReadOnlySpan<char>, out bool) as a final fallback.

    TryParseEnum<TEnum>(string, bool, out TEnum)

    Attempts to parse the specified string into an enumeration value of the given enum type.

    Declaration
    public static bool TryParseEnum<TEnum>(string s, bool ignoreCase, out TEnum value) where TEnum : struct, Enum
    Parameters
    Type Name Description
    string s

    The string representation of the enumeration value to parse.

    bool ignoreCase

    A boolean value indicating whether to ignore case during the parsing.

    TEnum value

    When this method returns, contains the parsed enumeration value of type TEnum if the operation succeeded, or the default value if it failed.

    Returns
    Type Description
    bool

    True if the string was successfully parsed into a value of the specified enumeration type; otherwise, false.

    Type Parameters
    Name Description
    TEnum

    The type of the enumeration to parse into. Must be a struct and an Enum.

    TryParseFloatInvariant(string, out float)

    Attempts to parse the specified string as a floating-point number using the invariant culture.

    Declaration
    public static bool TryParseFloatInvariant(string s, out float value)
    Parameters
    Type Name Description
    string s

    The string to parse, representing a floating-point number in invariant culture format.

    float value

    When this method returns, contains the parsed floating-point value if the conversion succeeded, or 0 if it failed.

    Returns
    Type Description
    bool

    True if the string was successfully parsed as a floating-point number; otherwise, false.

    TryParseInt(string, out int)

    Attempts to convert the specified string representation of a number to its integer equivalent.

    Declaration
    public static bool TryParseInt(string s, out int value)
    Parameters
    Type Name Description
    string s

    The string containing the number to parse.

    int value

    When this method returns, contains the integer value equivalent to the number contained in s, if the conversion succeeded; otherwise, 0.

    Returns
    Type Description
    bool

    True if the string was successfully converted; otherwise, false.

    Underline(string)

    Wraps the specified text in HTML underline tags (<u>).

    Declaration
    public static string Underline(string text)
    Parameters
    Type Name Description
    string text

    The input text to wrap; if null, an empty string will be used.

    Returns
    Type Description
    string

    The text wrapped in underline tags.

    In this article
    Back to top Scylla Framework - Core Module API Documentation