Quantcast
Viewing all articles
Browse latest Browse all 10032

Using dotnet String & String Builder

Hi,

I have a task to do some text manipulation on some fields in NAV and I decided the best way to do this would be to use either the System.String or System.Text.StringBuilder from dotnet. I am running into a few problems and need some help. I have searched and found nothing to help so far.

So my task is to replace part of some text, with some new text.

I have tried the following (simplified example)

TextValue1 := 'cat';
TextValue2 := 'dog';
StringBuilder := StringBuilder.StringBuilder;
StringBuilder.Replace(TextValue1,TextValue2);
MESSAGE(StringBuilder.ToString);

This is always returning blank. I have tried using System.String and the same thing happens.

Any help is much appreciated.

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>