RealDocs

UKismetSystemLibrary::ParseParamValue

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

Description

Returns true and fills OutValue if '-option=value' is present in InString for the given InParam.

Caveats & Gotchas

  • Returns false and leaves OutValue unchanged if the switch is present without a value (bare -option) — check ParseParam separately if you need to distinguish 'absent' from 'present but no value'.
  • Values are not unquoted or unescaped; if the original command line quoted the value, the quotes are part of OutValue.

Signature

static bool ParseParamValue(const FString& InString, const FString& InParam, FString& OutValue)

Parameters

Name Type Description Default
InString FString The string to search (typically a command line).
InParam FString The parameter name to look for, without the leading '-'.
OutValue FString Filled with the value if '-InParam=value' was found.

Return Type

bool

Example

Read a map name override from the command line C++
FString MapName;
if (UKismetSystemLibrary::ParseParamValue(UKismetSystemLibrary::GetCommandLine(), TEXT("map"), MapName))
{
    UE_LOG(LogTemp, Log, TEXT("Map override: %s"), *MapName);
}

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.