UKismetSystemLibrary::ParseCommandLine

Parses the given string into loose tokens, switches (arguments that begin with - or /) and parameters (-mySwitch=myVar)

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetSystemLibrary.h

Include

#include "Kismet/KismetSystemLibrary.h"

Source

/Engine/Source/Runtime/Engine/Private/KismetSystemLibrary.cpp

Syntax

static void ParseCommandLine
(
    const FString & InCmdLine,
    TArray< FString > & OutTokens,
    TArray< FString > & OutSwitches,
    TMap< FString, FString > & OutParams
)

Remarks

Parses the given string into loose tokens, switches (arguments that begin with - or /) and parameters (-mySwitch=myVar)

Parameters

Parameter

Description

InCmdLine

The the string to parse (ie '-foo -bar=/game/baz testtoken' )

OutTokens[out]

Filled with all loose tokens found in the string (ie: testToken in above example)

OutSwitches[out]

Filled with all switches found in the string (ie -foo)

OutParams[out]

Filled with all switches found in the string with the format key = value (ie: -bar, /game/baz)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss