FCommandLine

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/CommandLine.h

Include

#include "Misc/CommandLine.h"

Syntax

struct FCommandLine

Functions

Name Description

Public function Static

void

 

AddToSubprocessCommandline

(
    const TCHAR* Param
)

Adds a new parameter to subprocess command line.

Public function Static

void

 

Append

(
    const TCHAR* AppendString
)

Appends the passed string to the command line as it is (no space is added).

Public function Static

FString

 

BuildFromArgV

(
    const TCHAR* Prefix,
    int32 ArgC,
    TCHAR* ArgV,
    const TCHAR* Suffix
)

Builds a command line string from the ArgC/ArgV main() arguments, together with an optional prefix or suffix, for adding additional command list arguments programmatically.

Public function Static

const TCHAR ...

 

Get()

Returns an edited version of the executable's command line with the game name and certain other parameters removed.

Public function Static

const TCHAR ...

 

GetForLogging()

Returns an edited version of the executable's command line.

Public function Static

const TCHAR ...

 

GetOriginal()

Returns the command line originally passed to the executable.

Public function Static

const TCHAR ...

 

GetOriginalForLogging()

Returns an edited version of the command line originally passed to the executable.

Public function Static

const FStrin...

 

GetSubprocessCommandline()

Returns the subprocess command line string

Public function Static

bool

 

IsCommandLineLoggingFiltered()

Checks if command line logging filtering is enabled

Returns true if logging filter is enabled

Public function Static

bool

 

IsInitialized()

Checks if the command line has been initialized.

Public function Static

void

 

Parse

(
    const TCHAR* CmdLine,
    TArray< FString >& Tokens,
    TArray< FString >& Switches
)

Parses a string into tokens, separating switches (beginning with -) from other parameters

Public function Static

const TCHAR ...

 

RemoveExeName

(
    const TCHAR* CmdLine
)

Removes the executable name from the passed CmdLine, denoted by parentheses.

Public function Static

bool

 

Set

(
    const TCHAR* NewCommandLine
)

Sets CmdLine to the string given

Constants

Name

Description

bIsInitialized

Flag to check if the commandline has been initialized or not.

CmdLine

Character buffer containing the command line

LoggingCmdLine

Character buffer containing the command line filtered for logging purposes

LoggingOriginalCmdLine

Character buffer containing the original command line filtered for logging purposes

MaxCommandLineSize

Maximum size of the command line

OriginalCmdLine

Character buffer containing the original command line

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