LPStringCompat::ParseIntoArray (algorithme 4.27 : chaine vide -> [], separateur sensible a la casse) ; commandlet LPFixParseIntoArray : 114 noeuds rebranches dans 17 Blueprints, 0 ecart de liaison (controle integre), 0 broche orpheline, CompileAllBlueprints 0 erreur. LPDumpFunction : option -Exec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.5 KiB
C++
32 lines
1.5 KiB
C++
// Portage UE 5.5 (2026.9 beta) - correctif CX-B08 (ERR-027).
|
|
//
|
|
// UE 5.x a reecrit FString::ParseIntoArray sur UE::String::ParseTokens. Deux comportements
|
|
// ont change par rapport a UE 4.27, sans aucun avertissement :
|
|
// 1. chaine source vide, CullEmpty=false : UE4 renvoie [] ; UE5 renvoie [""] ;
|
|
// 2. recherche du separateur : UE4 respecte la casse (FCString::Strstr) ; UE5 l'ignore.
|
|
//
|
|
// Le cas 1 casse generatePerson() sans argument : "()" donne Presets=[""], GeneratePerson
|
|
// charge alors les 141 presets (suffixe "" + ".lpcharacter") et finit sur un corps legacy
|
|
// jamais charge -> personnage invisible et devetu.
|
|
//
|
|
// ULPStringCompat::ParseIntoArray reproduit a l'identique l'algorithme 4.27 (Source 4.27,
|
|
// Runtime/Core/Private/Containers/String.cpp, FString::ParseIntoArray). Ses parametres et
|
|
// ses valeurs par defaut sont ceux de UKismetStringLibrary::ParseIntoArray, pour que la
|
|
// commandlet LPFixParseIntoArray puisse rebrancher les noeuds existants sans perdre de liaison.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
|
#include "LPStringCompat.generated.h"
|
|
|
|
UCLASS()
|
|
class LIFEPLAY_API ULPStringCompat : public UBlueprintFunctionLibrary
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
/** ParseIntoArray avec le comportement exact de UE 4.27 (voir en-tete du fichier). */
|
|
UFUNCTION(BlueprintPure, Category = "Utilities|String", meta = (DisplayName = "Parse Into Array (UE4)"))
|
|
static TArray<FString> ParseIntoArray(const FString& SourceString, const FString& Delimiter = FString(TEXT(" ")), const bool CullEmptyStrings = true);
|
|
};
|