Modify

#442 closed Feature Request (Completed)

Proposed changes to _StringAddThousandsSep()

Reported by: GEOSoft Owned by: Valik
Milestone: 3.3.1.0 Component: Standard UDFs
Version: Severity: Blocking
Keywords: Cc:

Description

This allows for regional settings.

Func _StringAddThousandsSep($sString, $sThousands = -1, $sDecimal = -1)
	Local $sResult = "" ; Force string
	Local $rKey = "HKCU\Control Panel\International"
	If $sDecimal = -1 Then $sDecimal = RegRead($rKey, "sDecimal")
	If $sThousands = -1 Then $sThousands = RegRead($rKey, "sThousand")
	Local $aNumber = StringRegExp($sString, "(\d+)\D?(\d*)", 1)
	If UBound($aNumber) = 2 Then
		Local $sLeft = $aNumber[0]
		While StringLen($sLeft)
			$sResult = $sThousands & StringRight($sLeft, 3) & $sResult
			$sLeft = StringTrimRight($sLeft, 3)
		WEnd
		$sResult = StringTrimLeft($sResult, StringLen($sThousands)) ; Strip leading thousands separator
		If $aNumber[1] <> "" Then $sResult &= $sDecimal & $aNumber[1]
	EndIf
	Return $sResult
EndFunc   ;==>_StringAddThousandsSep

Attachments (0)

Change History (8)

comment:1 by TicketCleanup, on Jul 15, 2008 at 6:00:20 PM

Version: 3.2.12.0

Automatic ticket cleanup.

comment:2 by Valik, on Nov 16, 2008 at 2:54:26 AM

Severity: NoneBlocking

comment:3 by TicketCleanup, on Nov 16, 2008 at 5:00:02 AM

Severity: BlockingNone

Automatic ticket cleanup.

comment:4 by Valik, on Nov 17, 2008 at 2:50:19 AM

Severity: NoneBlocking
Status: newassigned

comment:5 by Gary, on Nov 17, 2008 at 11:21:53 AM

Milestone: 3.2.13.11
Resolution: Completed
Status: assignedclosed

Changed in version: 3.2.13.11

comment:6 by Valik, on Apr 25, 2009 at 7:29:46 AM

Milestone: 3.2.13.11
Resolution: Completed
Severity: BlockingNone
Status: closedreopened

I'm reopening this to remind myself to fix this stupid function with some changes I've been sent.

comment:7 by Valik, on May 5, 2009 at 9:28:25 PM

Owner: changed from Gary to Valik
Severity: NoneBlocking
Status: reopenedassigned

This needs addressed before the next beta is released. Setting the blocking flag to reflect that. I have code sent to me I just need to review it and commit it.

comment:8 by Valik, on May 20, 2009 at 2:34:00 AM

Milestone: 3.3.1.0
Resolution: Completed
Status: assignedclosed

Added in version: 3.3.1.0

Modify Ticket

Action
as closed The owner will remain Valik.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.