Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
add two utility functions to remove victorybp dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
getnamo committed Sep 19, 2017
1 parent ab0a949 commit a00246b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
Binary file modified Content/BluTickActor.uasset
Binary file not shown.
Binary file modified Content/BluiWidget.uasset
Binary file not shown.
Binary file modified Content/BluiWorldWidgetActorExample.uasset
Binary file not shown.
6 changes: 6 additions & 0 deletions Source/Blu/Private/BluBluprintFunctionLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,10 @@ FString UBluBlueprintFunctionLibrary::JSONToString(UBluJsonObj *ObjectToParse)
FString UBluBlueprintFunctionLibrary::GameRootDirectory()
{
return FPaths::ConvertRelativePathToFull(FPaths::GameDir());
}


bool UBluBlueprintFunctionLibrary::HasSubstring(const FString& SearchIn, const FString& Substring, ESearchCase::Type SearchCase /*= ESearchCase::IgnoreCase*/, ESearchDir::Type SearchDir /*= ESearchDir::FromStart*/)
{
return SearchIn.Contains(Substring, SearchCase, SearchDir);
}
16 changes: 14 additions & 2 deletions Source/Blu/Public/BluBlueprintFunctionLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,19 @@ class BLU_API UBluBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintCallable, meta = (DisplayName = "JSON To String", Keywords = "blui blu eye json parse string"), Category = Blu)
static FString JSONToString(UBluJsonObj *ObjectToParse);

UFUNCTION(BlueprintPure, Category = Blu)
//Utility functions taken from Victory Plugin
UFUNCTION(BlueprintPure, Category = "Blu Utility")
static FString GameRootDirectory();

};
/**
* Returns whether or not the SearchIn string contains the supplied Substring.
* Ex: "cat" is a contained within "concatenation" as a substring.
* @param SearchIn The string to search within
* @param Substring The string to look for in the SearchIn string
* @param bUseCase Whether or not to be case-sensitive
* @param bSearchFromEnd Whether or not to start the search from the end of the string instead of the beginning
*/
UFUNCTION(BlueprintPure, Category = "Blu Utility")
static bool HasSubstring(const FString& SearchIn, const FString& Substring, ESearchCase::Type SearchCase = ESearchCase::IgnoreCase, ESearchDir::Type SearchDir = ESearchDir::FromStart);

};

0 comments on commit a00246b

Please sign in to comment.