Modify

Opened 16 years ago

Closed 16 years ago

#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 Changed 16 years ago by TicketCleanup

  • Version 3.2.12.0 deleted

Automatic ticket cleanup.

comment:2 Changed 16 years ago by Valik

  • Severity changed from None to Blocking

comment:3 Changed 16 years ago by TicketCleanup

  • Severity changed from Blocking to None

Automatic ticket cleanup.

comment:4 Changed 16 years ago by Valik

  • Severity changed from None to Blocking
  • Status changed from new to assigned

comment:5 Changed 16 years ago by Gary

  • Milestone set to 3.2.13.11
  • Resolution set to Completed
  • Status changed from assigned to closed

Changed in version: 3.2.13.11

comment:6 Changed 16 years ago by Valik

  • Milestone 3.2.13.11 deleted
  • Resolution Completed deleted
  • Severity changed from Blocking to None
  • Status changed from closed to reopened

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

comment:7 Changed 16 years ago by Valik

  • Owner changed from Gary to Valik
  • Severity changed from None to Blocking
  • Status changed from reopened to assigned

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 Changed 16 years ago by Valik

  • Milestone set to 3.3.1.0
  • Resolution set to Completed
  • Status changed from assigned to closed

Added in version: 3.3.1.0

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Valik.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.