RealDocs

UKismetStringLibrary::Conv_StringToInt

function Engine Blueprint Since unknown
#include "Kismet/KismetStringLibrary.h"
Access: public Specifiers: staticBlueprintPureBlueprintAutocast

Description

Parses a string and returns the integer value it represents. This is the standard Blueprint 'String to Integer' conversion node.

Caveats & Gotchas

  • Returns 0 for strings that can't be parsed as a number at all, which is indistinguishable from an input string that legitimately reads "0" — there's no success/failure output.
  • Parsing stops at the first non-numeric character rather than failing outright, so "42abc" converts to 42 while "abc42" converts to 0.

Signature

static int32 Conv_StringToInt(const FString& InString)

Parameters

Name Type Description Default
InString const FString& The string to parse as an integer.

Return Type

int32

Example

Parse a numeric console argument C++
FString Arg = TEXT("25");
int32 Count = UKismetStringLibrary::Conv_StringToInt(Arg);
// Count == 25

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.