# Compare Single Character From FName

**URL:** <https://forums.unrealengine.com/t/compare-single-character-from-fname/452068>\
**Category:** Character & Animation\
**Tags:** unreal-engine, CPP, question\
**Created:** [July 11, 2019, 1:02pm UTC](https://forums.unrealengine.com/t/compare-single-character-from-fname/452068 "2019-07-11T13:02:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pDunkl](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pdunkl/32/1194600_2.png) [@pDunkl](https://forums.unrealengine.com/u/pDunkl)\
**Post date:** [July 11, 2019, 1:02pm UTC](https://forums.unrealengine.com/t/compare-single-character-from-fname/452068/1 "2019-07-11T13:02:08Z")

</div>

Hi,  
I was wondering if there is an cheaper or simpler solution if I want to get a single character from an FName and compare this character with another, than converting the fname first to an FString and then using left/chop/right/etc…

Example:  
checking the name of an socket if it’s first character is a “c”. (Socket names are FNames)

Current solution:  
SocketList[Idx].ToString().Left(1) == TEXT(“c”)
